Re: [Qemu-devel] [PATCH v2 06/18] pc: implement NVDIMM device abstract

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

 





On 08/25/2015 10:57 PM, Stefan Hajnoczi wrote:
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).


Yeah, the man page says you're right. Will clean it up.
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux