Skip to contentSkip to conversation

ioemu: Slightly improve error check in xenstore_vm_write()

PATCH New Yosuke Iwamatsu 1 participant 1 message Feb 4, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ioemu: Slightly improve error check in xenstore_vm_write()

xenstore.c +2 -0
index d30dafa..6bfcdbb 100644
@@ -1224,6 +1224,8 @@ int xenstore_vm_write(int domid, const char *key, const char *value)
     int rc = -1;
 
     path = xenstore_vm_key_path(domid, key);
+    if (!path)
+        return 0;
 
     rc = xs_write(xsh, XBT_NULL, path, value, strlen(value));
     if (rc == 0) {