Am 15.05.2012 15:04, schrieb j...@meyering.net: > From: Jim Meyering <meyer...@redhat.com> > > 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 <meyer...@redhat.com>
Acked-by: Kevin Wolf <kw...@redhat.com>