cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=0cf357c0296f9e2b2dc59e523551f87fbf34d7e4

commit 0cf357c0296f9e2b2dc59e523551f87fbf34d7e4
Author: Srivardhan Hebbar <sri.heb...@samsung.com>
Date:   Mon Nov 9 16:10:14 2015 -0800

    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.heb...@samsung.com>
    
    Reviewers: cedric
    
    Differential Revision: https://phab.enlightenment.org/D3273
    
    Signed-off-by: Cedric BAIL <ced...@osg.samsung.com>
---
 src/tests/eet/eet_suite.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/tests/eet/eet_suite.c b/src/tests/eet/eet_suite.c
index a028d64..9db0e9c 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 */
 

-- 


Reply via email to