Fix: test libc-wrapper: check malloc OOM
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 26 Nov 2014 17:38:21 +0000 (12:38 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 27 Nov 2014 20:27:26 +0000 (15:27 -0500)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
tests/regression/ust/libc-wrapper/prog.c

index 3068257f88323bad164cfaf69b65ec29eda8b258..a922211f7b6c52f4964bdc5f1054fe540b5a13dd 100644 (file)
@@ -31,6 +31,9 @@ int main()
 
        for (i = 0; i < N_ITER; i++) {
                ptrs[i] = malloc(i+1000);
+               if (!ptrs[i]) {
+                       exit(EXIT_FAILURE);
+               }
 
                memcpy(ptrs[i], teststr, sizeof(teststr));
 
This page took 0.026144 seconds and 4 git commands to generate.