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