Re: [PATCH] btrfs: fix possible leak in btrfs_ioctl_balance()

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

 



On Wed, Oct 21, 2015 at 12:50:06AM +0200, Christian Engelmayer wrote:
> Commit 8eb934591f8b ("btrfs: check unsupported filters in balance
> arguments") adds a jump to exit label out_bargs in case the argument
> check fails. At this point in addition to the bargs memory, the
> memory for struct btrfs_balance_control has already been allocated.
> Ownership of bctl is passed to btrfs_balance() in the good case,
> thus the memory is not freed due to the introduced jump. Make sure
> that the memory gets freed in any case as necessary. Detected by
> Coverity CID 1328378.
> 
> Signed-off-by: Christian Engelmayer <cengelma@xxxxxx>
Reviewed-by: David Sterba <dsterba@xxxxxxxx>

Thanks for fixig it.
--
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