]> git.baikalelectronics.ru Git - kernel.git/commit
test_objagg: Uninitialized variable in error handling
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 13 Feb 2019 08:59:31 +0000 (11:59 +0300)
committerDavid S. Miller <davem@davemloft.net>
Thu, 14 Feb 2019 06:13:29 +0000 (22:13 -0800)
commit405e544b354d0bbbd91bd3d9a66b74b1933a8ffd
treecd1a56cd7317ffff6d34300aba2fab45c91c6ad9
parentdb20720c7baff73a9b1bd744887e9706e4ab1591
test_objagg: Uninitialized variable in error handling

We need to set the error message on this path otherwise some of the
callers, such as test_hints_case(), print from an uninitialized pointer.

We had a similar bug earlier and set "errmsg" to NULL in the caller,
test_delta_action_item().  That code is no longer required so I have
removed it.

Fixes: f8ebf29b928f ("lib: objagg: implement optimization hints assembly and use hints for object creation")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
lib/test_objagg.c