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:
Srivardhan Hebbar 2015-11-09 16:10:14 -08:00 committed by Cedric BAIL
parent 04260b446b
commit 0cf357c029
1 changed files with 2 additions and 0 deletions

View File

@ -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 */