OSDN Git Service
(root)
/
ccunit
/
ccunit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c74aa9f
)
add allocate error check
author
tsutsumi
<>
Tue, 23 Sep 2003 14:22:48 +0000
(14:22 +0000)
committer
tsutsumi
<>
Tue, 23 Sep 2003 14:22:48 +0000
(14:22 +0000)
src/ccunit/CCUnitTestCase.c
patch
|
blob
|
history
diff --git
a/src/ccunit/CCUnitTestCase.c
b/src/ccunit/CCUnitTestCase.c
index
25841be
..
d645b6a
100755
(executable)
--- a/
src/ccunit/CCUnitTestCase.c
+++ b/
src/ccunit/CCUnitTestCase.c
@@
-36,6
+36,8
@@
CCUnitTestCase* ccunit_newTestCase (const char* name,
void (*runTest)())
{
CCUnitTestCase* testCase = calloc (1, sizeof (*testCase));
+ if (!testCase)
+ return NULL;
testCase->name = safe_strdup (name);
testCase->desc = !desc ? safe_strdup (name) : strdup (desc);
testCase->runTest = runTest;