Skip to contentSkip to conversation

virtio_cleanup(): Remove unneeded g_free() parameter check

Qemu-devel Applied Luiz Capitulino 2 participants 3 messages Feb 9, 2012

lore
Share & tools
lore
#0 lore raw
---
 hw/virtio.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
hw/virtio.c +1 -2
index 74cc038..064aecf 100644
@@ -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);
 }
Signature · 1 line
1.7.9.111.gf3fb0.dirty
#2 lore raw
Quoted 9 lines · On Thu, 9 Feb 2012 15:28:58 +0000 Stefan Hajnoczi <[email protected]> wrote:
Quoted 5 lines · Luiz Capitulino
---
 hw/virtio.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

Tweaked commit message to be more conventional with "virtio: Remove unneeded g_free() check in virtio_cleanup()".

Thanks.

Quoted 6 lines

Thanks, applied to the trivial patches tree:
https://github.com/stefanha/qemu/commits/trivial-patches

Stefan