diff options
author | Philippe Reynes | 2020-02-06 17:12:59 +0100 |
---|---|---|
committer | Tom Rini | 2020-02-13 10:10:50 -0500 |
commit | 58b209cf6060db60375a2ca9fb21febfae3b8f31 (patch) | |
tree | 2fe511c43fb912e3fd0074750491c16ff5e04e48 /common | |
parent | 58fc2b54f5b9102d593f3b98c370b6cbaeb97ac2 (diff) |
test: aes: fix memleak
In the first version, the result of malloc is checked
with ut_assertnonnull. But on a fail, this macro exit
the function, so previously malloc are not freed.
So to avoid a memleak, we don't use ut_assertnonnull,
but simply check the return of malloc. If one has failed,
we freed all the allocated memory and quit the function.
Reported-by: Coverity (CID: 284403)
Reported-by: Coverity (CID: 284404)
Reported-by: Coverity (CID: 284405)
Reported-by: Coverity (CID: 284406)
Reported-by: Coverity (CID: 284407)
Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
Diffstat (limited to 'common')
0 files changed, 0 insertions, 0 deletions