All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Pointer should be checked before use
@ 2008-01-09  4:20 Yang, Xiaowei
  2008-01-09  8:38 ` Keir Fraser
  2008-01-09 10:09 ` Ian Jackson
  0 siblings, 2 replies; 6+ messages in thread
From: Yang, Xiaowei @ 2008-01-09  4:20 UTC (permalink / raw)
  To: xen-devel

Signed-off-by: Xiaowei Yang <xiaowei.yang@intel.com>

diff -r c70d47b78f65 -r 89710484b825 tools/libxc/xc_linux.c
--- a/tools/libxc/xc_linux.c    Tue Jan 08 02:30:24 2008 +0800
+++ b/tools/libxc/xc_linux.c    Tue Jan 08 05:37:23 2008 +0800
@@ -472,7 +472,10 @@ void *xc_gnttab_map_grant_refs(int xcg_h
     struct ioctl_gntdev_map_grant_ref *map;
     void *addr = NULL;
     int i;
-
+
+    if ( domids == NULL || refs == NULL )
+        return NULL;
+
     map = malloc(sizeof(*map) +
                  (count-1) * sizeof(struct
ioctl_gntdev_map_grant_ref));
     if ( map == NULL )

Regards, 
Xiaowei 

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-01-09 15:36 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-09  4:20 [PATCH] Pointer should be checked before use Yang, Xiaowei
2008-01-09  8:38 ` Keir Fraser
2008-01-09 10:09 ` Ian Jackson
2008-01-09 14:37   ` Yang, Xiaowei
2008-01-09 15:26     ` Ian Jackson
2008-01-09 15:36       ` Samuel Thibault

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.