]> xenbits.xensource.com Git - libvirt.git/commitdiff
initialize pointer to NULL
authorWen Congyang <wency@cn.fujitsu.com>
Mon, 4 Jul 2011 06:00:28 +0000 (14:00 +0800)
committerDaniel Veillard <veillard@redhat.com>
Mon, 4 Jul 2011 06:00:28 +0000 (14:00 +0800)
cmd is not initialized to NULL, but we try to freed it if we
meet some error.

src/qemu/qemu_command.c

index fc15f87e4ce61e07f5afc26bff310a1ac5c17835..6e4480ef257796cb2c4db8329c4012ddee3d5f70 100644 (file)
@@ -5827,7 +5827,7 @@ virDomainDefPtr qemuParseCommandLine(virCapsPtr caps,
     const char **nics = NULL;
     int video = VIR_DOMAIN_VIDEO_TYPE_CIRRUS;
     int nvirtiodisk = 0;
-    qemuDomainCmdlineDefPtr cmd;
+    qemuDomainCmdlineDefPtr cmd = NULL;
 
     if (!progargv[0]) {
         qemuReportError(VIR_ERR_INTERNAL_ERROR,