qemu-devel
[Top][All Lists]
Advanced

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

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


From: Xiao Guangrong
Subject: Re: [Qemu-devel] [PATCH v2 06/18] pc: implement NVDIMM device abstract
Date: Wed, 26 Aug 2015 17:37:53 +0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0



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.



reply via email to

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