On Fri, Aug 14, 2015 at 10:51:59PM +0800, Xiao Guangrong wrote:
> +static void set_file(Object *obj, const char *str, Error **errp)
> +{
> + PCNVDIMMDevice *nvdimm = PC_NVDIMM(obj);
> +
> + if (nvdimm->file) {
> + g_free(nvdimm->file);
> + }
g_free(NULL) is a nop so it's safe to replace the if with just
g_free(nvdimm->file).
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html