test_objagg: Fix potential memory leak in error handling
authorAditya Pakki <pakki001@umn.edu>
Fri, 12 Jun 2020 20:01:54 +0000 (15:01 -0500)
committerSasha Levin <sashal@kernel.org>
Tue, 30 Jun 2020 19:36:14 +0000 (15:36 -0400)
commit796100872499d7a1581ff3b6fc0f55bab2e46bc5
treeae78da23c9dd66542a59ddbe0b20a4415ec76ea4
parenta81106f526afbfce8d2cbc86a5f9b764bc21b557
test_objagg: Fix potential memory leak in error handling

[ Upstream commit a6379f0ad6375a707e915518ecd5c2270afcd395 ]

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>
lib/test_objagg.c