sof/tools/testbench
Mohana Datta Yelugoti 108912bba8 tools: testbench:add null pointer variable check before accessing it
When the realloc() function fails, a NULL pointer is returned. But,
if the size argument is zero, then also NULL is returned. So, to
differentiate that, we also check if size is non zero. Only if
pointer is NULL and size is non-zero, we come to the conclusion that
realloc() failed and the allocated memory till now is freed and
appropriate error is returned.

If realloc is called on a pointer and fails, the memory pointed by
the pointer isn't freed. When realloc() fails, even this memory
is freed.

Signed-off-by: Mohana Datta Yelugoti <ymdatta.work@gmail.com>
2020-08-10 11:10:20 +01:00
..
include/testbench tools: testbench: Support multiple output files 2020-08-06 12:25:14 +01:00
CMakeLists.txt cmake: no space after -imacros to avoid de-duplication 2020-06-24 11:29:27 +01:00
alloc.c alloc: remove unused rrealloc 2020-04-10 20:00:05 +03:00
common_test.c testbench: add null pointer check for function argument 2020-07-23 14:28:26 +01:00
edf_schedule.c trace: replace TRACE_CLASS_ by uuids 2020-04-30 11:39:37 +02:00
file.c treewide: Remove references to .free and .avail members of audio_stream. 2020-08-03 21:53:14 +01:00
ipc.c ipc: use notifications allocated by sources 2020-03-02 13:28:52 +01:00
ll_schedule.c testbench: remove unneeded variable 2020-03-25 15:22:09 +01:00
panic.c Testbench: panic() calls abort() 2020-03-27 10:26:56 +01:00
schedule.c tasks: add uuid based identification for tasks 2020-03-17 15:11:42 +02:00
testbench.c tools: testbench: Support channels specification 2020-08-06 12:25:14 +01:00
timer.c timer: change id values 2019-08-06 18:59:27 +01:00
topology.c tools: testbench:add null pointer variable check before accessing it 2020-08-10 11:10:20 +01:00
trace.c trace: replace TRACE_CLASS_ by uuids 2020-04-30 11:39:37 +02:00