From 1aa5f85bb8e2d92548dd91a925eb70af5eb0f91e Mon Sep 17 00:00:00 2001 From: Wen Congyang Date: Mon, 4 Jul 2011 14:00:28 +0800 Subject: [PATCH] initialize pointer to NULL cmd is not initialized to NULL, but we try to freed it if we meet some error. --- src/qemu/qemu_command.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index fc15f87e4c..6e4480ef25 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -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,