]> git.proxmox.com Git - mirror_qemu.git/commit - vl.c
maint: avoid useless "if (foo) free(foo)" pattern
authorMarkus Armbruster <armbru@redhat.com>
Wed, 26 Aug 2015 12:02:53 +0000 (14:02 +0200)
committerMichael Tokarev <mjt@tls.msk.ru>
Fri, 11 Sep 2015 07:21:38 +0000 (10:21 +0300)
commit012aef073461fd24a901d7a8742532093b7f6ae5
tree4ee28d5cedea44f2af2b5b3a7fe482d9e80a3fad
parentef1e1e0782e99c9dcf2b35e5310cdd8ca9211374
maint: avoid useless "if (foo) free(foo)" pattern

My Coccinelle semantic patch finds a few more, because it also fixes up
the equally pointless conditional

    if (foo) {
        free(foo);
        foo = NULL;
    }

Result (feel free to squash it into your patch):

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
hw/char/exynos4210_uart.c
hw/net/rtl8139.c
hw/ppc/spapr_pci.c
hw/sd/sdhci.c
hw/usb/hcd-ehci-pci.c
tests/test-hbitmap.c
translate-all.c
vl.c
xen-mapcache.c