btrfs: fix use-after-free in mount_subvol()
authorChristoph Jaeger <christophjaeger@linux.com>
Sat, 12 Apr 2014 11:33:13 +0000 (13:33 +0200)
committerChris Mason <clm@fb.com>
Mon, 14 Apr 2014 18:31:08 +0000 (11:31 -0700)
commit0040e606e35a0db80fc3fac04ccc7c7176a8e2b1
tree42978de09e95365ba46df73587b3a30149566247
parente4fbaee29272533a242f117d18712e2974520d2c
btrfs: fix use-after-free in mount_subvol()

Pointer 'newargs' is used after the memory that it points to has already
been freed.

Picked up by Coverity - CID 1201425.

Fixes: 0723a0473f ("btrfs: allow mounting btrfs subvolumes with
different ro/rw options")
Signed-off-by: Christoph Jaeger <christophjaeger@linux.com>
Signed-off-by: Chris Mason <clm@fb.com>
fs/btrfs/super.c