virtio: Remove unneeded g_free() check in virtio_cleanup()
authorLuiz Capitulino <lcapitulino@redhat.com>
Thu, 9 Feb 2012 13:29:42 +0000 (11:29 -0200)
committerStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Fri, 10 Feb 2012 10:44:52 +0000 (10:44 +0000)
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
hw/virtio.c

index 74cc038af9b4283384d0b688ed2af64cede948ce..064aecf55316c9be95be1495ad38552677780d9f 100644 (file)
@@ -845,8 +845,7 @@ int virtio_load(VirtIODevice *vdev, QEMUFile *f)
 void virtio_cleanup(VirtIODevice *vdev)
 {
     qemu_del_vm_change_state_handler(vdev->vmstate);
-    if (vdev->config)
-        g_free(vdev->config);
+    g_free(vdev->config);
     g_free(vdev->vq);
     g_free(vdev);
 }