diff options
author | Srivardhan Hebbar <sri.hebbar@samsung.com> | 2015-11-09 16:10:14 -0800 |
---|---|---|
committer | Cedric BAIL <cedric@osg.samsung.com> | 2015-11-09 16:10:17 -0800 |
commit | 0cf357c0296f9e2b2dc59e523551f87fbf34d7e4 (patch) | |
tree | 291840d662c2736666be9c552030251f82b10f95 /src/tests/eet | |
parent | 04260b446b70b57a1870bac77b5d4d4cb6225af8 (diff) | |
download | efl-0cf357c0296f9e2b2dc59e523551f87fbf34d7e4.tar.gz |
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>
Diffstat (limited to 'src/tests/eet')
-rw-r--r-- | src/tests/eet/eet_suite.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/tests/eet/eet_suite.c b/src/tests/eet/eet_suite.c index a028d64b90..9db0e9ce93 100644 --- a/src/tests/eet/eet_suite.c +++ b/src/tests/eet/eet_suite.c @@ -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 */ |