qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 2/3] scsi, pci, qdev, isa-bus, sysbus: don't let


From: Kevin Wolf
Subject: Re: [Qemu-devel] [PATCH 2/3] scsi, pci, qdev, isa-bus, sysbus: don't let *_get_fw_dev_path return NULL
Date: Tue, 15 May 2012 15:35:56 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120329 Thunderbird/11.0.1

Am 15.05.2012 15:04, schrieb address@hidden:
> From: Jim Meyering <address@hidden>
> 
> Use g_strdup rather than strdup, because the sole caller
> (qdev_get_fw_dev_path_helper) assumes it gets non-NULL, and dereferences
> it.  Besides, in that caller, the allocated buffer is already freed with
> g_free, so it's better to allocate with a matching g_strdup.
> 
> In one case, (scsi-bus.c) it was trivial, so I replaced an snprintf+
> g_strdup combination with an equivalent g_strdup_printf use.
> 
> Signed-off-by: Jim Meyering <address@hidden>

Acked-by: Kevin Wolf <address@hidden>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]