]> xenbits.xensource.com Git - xen.git/commitdiff
Fix two memory leaks in xend.
authorkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Fri, 14 Sep 2007 15:04:33 +0000 (16:04 +0100)
committerkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Fri, 14 Sep 2007 15:04:33 +0000 (16:04 +0100)
Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
tools/python/xen/lowlevel/xc/xc.c
tools/python/xen/lowlevel/xs/xs.c

index 93402b1e5b1f570a9d1f6999ee6c63a2cecdd11a..d91b795636fcc7c29e80ac12ab7a770321b1e86c 100644 (file)
@@ -346,6 +346,7 @@ static PyObject *pyxc_domain_getinfo(XcObject *self,
             Py_DECREF(list);
             if ( pyhandle  != NULL ) { Py_DECREF(pyhandle);  }
             if ( info_dict != NULL ) { Py_DECREF(info_dict); }
+            free(info);
             return NULL;
         }
         for ( j = 0; j < sizeof(xen_domain_handle_t); j++ )
index 45cbf773d91c8996f59736f58925c3d83dcc9dc8..b2c4b090e467693ca16513f74aa839c19149b701 100644 (file)
@@ -365,6 +365,7 @@ static PyObject *xspy_set_permissions(XsHandle *self, PyObject *args)
         goto exit;
     }
 
+    free(xsperms);
     Py_INCREF(Py_None);
     return Py_None;