From: Don Slutz Date: Mon, 28 Jul 2014 16:06:02 +0000 (-0400) Subject: xenbaked.c: Fix return handling for case of mmap failure X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~4578 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=9ef51438e5410650c0525274dcfc7e1a503b6833;p=xen.git xenbaked.c: Fix return handling for case of mmap failure mmap() returns MAP_FAILED not NULL. Signed-off-by: Don Slutz Acked-by: Ian Campbell --- diff --git a/tools/xenmon/xenbaked.c b/tools/xenmon/xenbaked.c index 985f1dd123..dc61d14f8e 100644 --- a/tools/xenmon/xenbaked.c +++ b/tools/xenmon/xenbaked.c @@ -674,7 +674,7 @@ static void alloc_qos_data(int ncpu) new_qos = (_new_qos_data *) mmap(0, sizeof(_new_qos_data), PROT_READ|PROT_WRITE, MAP_SHARED, qos_fd, off); off += i; - if (new_qos == NULL) { + if (new_qos == MAP_FAILED) { PERROR("mmap"); exit(3); }