summaryrefslogtreecommitdiff
path: root/cmds-subvolume.c
diff options
context:
space:
mode:
authorQu Wenruo <quwenruo@cn.fujitsu.com>2016-10-24 10:43:35 +0800
committerDavid Sterba <dsterba@suse.com>2016-12-14 15:06:34 +0100
commita2883ea16d15ce02c3279f835736e5072dd6e709 (patch)
tree01fe98186fb1455c838a6a7d0a5004ccd5d85cd1 /cmds-subvolume.c
parent45f782abf3694d4cf2b61adeccf0c8c8974fc23f (diff)
btrfs-progs: check: fix NULL pointer dereference for possible memory allocation failure
We didn't check 'path' allocated in check_root_ref(), which can cause NULL pointer dereference if the memory allocation failed. Fix it by using stack memory, since the function should return error bitmap not minus error code, we don't want memory allocation to be an exception. Resolves-Coverity-CID: 1372510 Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'cmds-subvolume.c')
0 files changed, 0 insertions, 0 deletions