Fix: test libc-wrapper: check malloc OOM
[lttng-tools.git] / tests / regression / ust / libc-wrapper / prog.c
index b54bb49b410601ff3a771d6976eddccf5a0da1cd..4eb7d48a5925a212df2f971fdcc8ad9e47646873 100644 (file)
@@ -31,6 +31,9 @@ int main(int argc, char **argv)
 
        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.022746 seconds and 4 git commands to generate.