From: Mathieu Desnoyers Date: Wed, 26 Nov 2014 17:38:21 +0000 (-0500) Subject: Fix: test libc-wrapper: check malloc OOM X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=ca72068eb662b086b30bd7c276114aae550a4358;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 b54bb49b4..4eb7d48a5 100644 --- a/tests/regression/ust/libc-wrapper/prog.c +++ b/tests/regression/ust/libc-wrapper/prog.c @@ -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));