New memory is allocated but its result(success or fail) is not checked,
so it is fixed to check and exit if malloc is failed.
Change-Id: I4d9f0d30ccf84185f6292d0ae68ca7d735121657
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
data.num_threads = MULTI_THREADING;
data.new = (u_char **)malloc(sizeof(u_char *)*data.num_threads);
+ if (!data.new)
+ err(1, "Memory allocation error: thread list");
/* Allocate oldsize+1 bytes instead of oldsize bytes to ensure
that we never try to malloc(0) and get a NULL pointer */