forked from enlightenment/efl
eet: add check for realloc fail.
Summary: Thought, if realloc fails, its better to fail the test case than continue. Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com> Reviewers: cedric Differential Revision: https://phab.enlightenment.org/D3273 Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
This commit is contained in:
parent
04260b446b
commit
0cf357c029
|
@ -828,6 +828,8 @@ append_string(void *data,
|
|||
length = *string ? strlen(*string) : 0;
|
||||
*string = realloc(*string, strlen(str) + length + 1);
|
||||
|
||||
fail_unless(*string); // Fail test case if realloc fails.
|
||||
|
||||
memcpy((*string) + length, str, strlen(str) + 1);
|
||||
} /* append_string */
|
||||
|
||||
|
|
Loading…
Reference in New Issue