|
|
|
|
|
|
|
|
|
|
xen-devel
[Xen-devel] [PATCH] Pointer should be checked before use
Signed-off-by: Xiaowei Yang <xiaowei.yang@xxxxxxxxx>
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
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
<Prev in Thread] |
Current Thread |
[Next in Thread>
|
- [Xen-devel] [PATCH] Pointer should be checked before use,
Yang, Xiaowei <=
|
|
|
|
|