Re: [PATCH v2 23/27] btrfs-progs: use libbtrfsutil for subvol sync

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Feb 23, 2018 at 02:41:27PM -0800, Omar Sandoval wrote:
> > >  static int cmd_subvol_sync(int argc, char **argv)
> > >  {
> > >  	int fd = -1;
> > > -	int i;
> > >  	int ret = 1;
> > >  	DIR *dirstream = NULL;
> > > -	u64 *ids = NULL;
> > > -	int id_count;
> > > +	uint64_t *ids;
> > 
> > "ids" should be initialized to prevent to be used uninitialized for free()
> > in error path (clang build warning).
> 
> I'm disappointed that GCC didn't also warn here, but thanks, fixed.

It's not reported even with the make W=3 level, gcc version 7.3.0.
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux