mirror of
https://github.com/hardkernel/linux.git
synced 2026-03-24 19:40:21 +09:00
test_objagg: Fix potential memory leak in error handling
[ Upstream commit a6379f0ad6 ]
In case of failure of check_expect_hints_stats(), the resources
allocated by objagg_hints_get should be freed. The patch fixes
this issue.
Signed-off-by: Aditya Pakki <pakki001@umn.edu>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Sasha Levin
parent
6fd916e249
commit
8dba9173a3
@@ -979,10 +979,10 @@ err_check_expect_stats2:
|
||||
err_world2_obj_get:
|
||||
for (i--; i >= 0; i--)
|
||||
world_obj_put(&world2, objagg, hints_case->key_ids[i]);
|
||||
objagg_hints_put(hints);
|
||||
objagg_destroy(objagg2);
|
||||
i = hints_case->key_ids_count;
|
||||
objagg_destroy(objagg2);
|
||||
err_check_expect_hints_stats:
|
||||
objagg_hints_put(hints);
|
||||
err_hints_get:
|
||||
err_check_expect_stats:
|
||||
err_world_obj_get:
|
||||
|
||||
Reference in New Issue
Block a user