Fix: test libc-wrapper: check malloc OOM
[lttng-tools.git] / 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.024347 seconds and 4 git commands to generate.