qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [RFC v2 PATCH 2/3] spapr: Add NVDIMM device support


From: Shivaprasad G Bhat
Subject: Re: [Qemu-devel] [RFC v2 PATCH 2/3] spapr: Add NVDIMM device support
Date: Tue, 16 Jul 2019 13:23:12 +0530
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2

Hi Fabiano,


On 05/22/2019 09:37 PM, Fabiano Rosas wrote:
Shivaprasad G Bhat <address@hidden> writes:

+    /* Create DT entries for cold plugged NVDIMM devices */
+    dimms = nvdimm_get_device_list();
+    for (; dimms; dimms = dimms->next) {
+        NVDIMMDevice *nvdimm = dimms->data;
+
+        spapr_populate_nvdimm_node(fdt, offset, nvdimm);
+    }
+    g_slist_free(dimms);
To free the whole list you'll need another variable in the loop above,
right?

Nope. TheĀ  g_slist_free() takes care of freeing the list node pointers.

As I am iterating using the original dimms variable, I would still not
be freeing the list here though, fixing that in next version.

Valgrind pointed out few more leaks in many places, will fix them all.


Cheers




reply via email to

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