diff mbox

[TRIVIAL] virtio_cleanup(): Remove unneeded g_free() parameter check

Message ID 20120209112942.77ce62bf@doriath.home
State New
Headers show

Commit Message

Luiz Capitulino Feb. 9, 2012, 1:29 p.m. UTC
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
---
 hw/virtio.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

Comments

Stefan Hajnoczi Feb. 9, 2012, 3:28 p.m. UTC | #1
On Thu, Feb 09, 2012 at 11:29:42AM -0200, Luiz Capitulino wrote:
> 
> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
> ---
>  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, applied to the trivial patches tree:
https://github.com/stefanha/qemu/commits/trivial-patches

Stefan
Luiz Capitulino Feb. 9, 2012, 3:48 p.m. UTC | #2
On Thu, 9 Feb 2012 15:28:58 +0000
Stefan Hajnoczi <stefanha@gmail.com> wrote:

> On Thu, Feb 09, 2012 at 11:29:42AM -0200, Luiz Capitulino wrote:
> > 
> > Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
> > ---
> >  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.

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

Patch

diff --git a/hw/virtio.c b/hw/virtio.c
index 74cc038..064aecf 100644
--- a/hw/virtio.c
+++ b/hw/virtio.c
@@ -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);
 }