u-boot/test/lib
Philippe Reynes 58b209cf60 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>
2020-02-13 10:10:50 -05:00
..
asn1.c test: add asn1 unit test 2019-12-06 16:44:20 -05:00
cmd_ut_lib.c cmd_ut: add a parameter prefix to the function cmd_ut_category 2020-01-07 11:13:25 -05:00
hexdump.c test: call hexdump tests via ut lib 2019-04-22 18:13:21 -04:00
lmb.c dm: core: Create a new header file for 'compat' features 2020-02-05 19:33:46 -07:00
Makefile aes: add test unit for aes128 2020-01-17 10:15:49 -05:00
string.c test: provide unit test for memory functions 2019-02-09 07:50:53 -05:00
test_aes.c test: aes: fix memleak 2020-02-13 10:10:50 -05:00
test_errno_str.c test: provide test for errno_str() 2019-10-31 07:22:53 -04:00