summaryrefslogtreecommitdiff
path: root/src/tests/eet/eet_suite.c
diff options
context:
space:
mode:
authorSrivardhan Hebbar <sri.hebbar@samsung.com>2015-11-09 16:10:14 -0800
committerCedric BAIL <cedric@osg.samsung.com>2015-11-09 16:10:17 -0800
commit0cf357c0296f9e2b2dc59e523551f87fbf34d7e4 (patch)
tree291840d662c2736666be9c552030251f82b10f95 /src/tests/eet/eet_suite.c
parent04260b446b70b57a1870bac77b5d4d4cb6225af8 (diff)
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/eet_suite.c')
-rw-r--r--src/tests/eet/eet_suite.c2
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,
828 length = *string ? strlen(*string) : 0; 828 length = *string ? strlen(*string) : 0;
829 *string = realloc(*string, strlen(str) + length + 1); 829 *string = realloc(*string, strlen(str) + length + 1);
830 830
831 fail_unless(*string); // Fail test case if realloc fails.
832
831 memcpy((*string) + length, str, strlen(str) + 1); 833 memcpy((*string) + length, str, strlen(str) + 1);
832} /* append_string */ 834} /* append_string */
833 835