Petr Holasek fae4fe
diff -up numactl-2.0.7/numademo.c.orig numactl-2.0.7/numademo.c
Petr Holasek fae4fe
--- numactl-2.0.7/numademo.c.orig	2012-02-15 11:47:10.617212257 +0100
Petr Holasek fae4fe
+++ numactl-2.0.7/numademo.c	2012-02-15 11:47:38.570214219 +0100
Petr Holasek fae4fe
@@ -156,6 +156,11 @@ void memtest(char *name, unsigned char *
Petr Holasek fae4fe
 	int i;
Petr Holasek fae4fe
 	char title[128], result[128];
Petr Holasek fae4fe
 
Petr Holasek fae4fe
+	if (!mem) {
Petr Holasek fae4fe
+		fprintf(stderr,"Failed to allocate %lu bytes of memory. Test \"%s\" exits.\n", msize, name);
Petr Holasek fae4fe
+		return;
Petr Holasek fae4fe
+	}
Petr Holasek fae4fe
+
Petr Holasek fae4fe
 #ifdef HAVE_STREAM_LIB
Petr Holasek fae4fe
 	if (thistest == STREAM) {
Petr Holasek fae4fe
 		do_stream(name, mem);