diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index a95a60c36ab04803f0f878cebe21f801723347ef..3afe8a7b2c3bd97ad4e67a4e701d9284c4d37738 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -1713,7 +1713,8 @@ virQEMUCapsNewBinary(const char *binary) { virQEMUCapsPtr qemuCaps = virQEMUCapsNew(); - qemuCaps->binary = g_strdup(binary); + if (qemuCaps) + qemuCaps->binary = g_strdup(binary); return qemuCaps; }