projects
/
platform
/
upstream
/
nsjail.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
45b7732
)
Exit test program in case of malloc fail
submit/tizen/20210831.013333
author
Kunhoon Baik
<knhoon.baik@samsung.com>
Tue, 31 Aug 2021 01:31:40 +0000
(10:31 +0900)
committer
Kunhoon Baik
<knhoon.baik@samsung.com>
Tue, 31 Aug 2021 01:31:40 +0000
(10:31 +0900)
test/memory_syscall_test.cc
patch
|
blob
|
history
diff --git
a/test/memory_syscall_test.cc
b/test/memory_syscall_test.cc
index 91e2a21a0420f2f4f9993844b676e9869067abbc..7c14621965232814363b90f59448bbb12233e8c2 100644
(file)
--- a/
test/memory_syscall_test.cc
+++ b/
test/memory_syscall_test.cc
@@
-10,8
+10,11
@@
int main()
int pid;
while(1){
a = (char*)calloc(1000*1000,sizeof(char));
- if (a == NULL)
+ if (a == NULL)
{
printf("not enough memory\n");
+ return -1;
+ }
+
for(i=0; i<1000*1000;i++)
a[i]=(char)i;
usleep(100*1000);