From: Mathieu Desnoyers Date: Wed, 26 Nov 2014 17:38:21 +0000 (-0500) Subject: Fix: test libc-wrapper: check malloc OOM X-Git-Tag: v2.6.0-rc4~16 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=5eb5134329e27db32b0643175f5a178ee884b0ce;p=lttng-tools.git Fix: test libc-wrapper: check malloc OOM Signed-off-by: Mathieu Desnoyers Signed-off-by: Jérémie Galarneau --- diff --git a/tests/regression/ust/libc-wrapper/prog.c b/tests/regression/ust/libc-wrapper/prog.c index 3068257f8..a922211f7 100644 --- a/tests/regression/ust/libc-wrapper/prog.c +++ b/tests/regression/ust/libc-wrapper/prog.c @@ -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));