]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: tests: Fix a memory leak in error handling path in 'run_test()'
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sun, 10 Sep 2017 11:19:38 +0000 (13:19 +0200)
committerDavid Sterba <dsterba@suse.com>
Mon, 30 Oct 2017 11:27:56 +0000 (12:27 +0100)
commit9946baf9970a45ed904c4864c9fe5ecd2139651a
treebef9d02206c63f93b4b77cfa140864e97cea4888
parent81964de61d24e51af72242ad4d9cd2d65894cd51
btrfs: tests: Fix a memory leak in error handling path in 'run_test()'

If 'btrfs_alloc_path()' fails, we must free the resources already
allocated, as done in the other error handling paths in this function.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Qu Wenruo <quwenruo.btrfs@gmx.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/tests/free-space-tree-tests.c