On 09/14/2011 02:02 PM, Marc-André Lureau wrote:
Also initialize to NULL a few variables that might get free before being set. --- src/conf/domain_audit.c | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-) +++ b/src/conf/domain_audit.c @@ -250,8 +250,8 @@ virDomainAuditHostdev(virDomainObjPtr vm, virDomainHostdevDefPtr hostdev, { char uuidstr[VIR_UUID_STRING_BUFLEN]; char *vmname; - char *address; - char *device; + char *address = NULL; + char *device = NULL; const char *virt;
Good catch - this plugs a crash on OOM. ACK and pushed. -- Eric Blake eblake@xxxxxxxxxx +1-801-349-2682 Libvirt virtualization library http://libvirt.org -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list