14.09.2023 11:26, Michael Tokarev wrote:
14.09.2023 11:18, Daniel P. Berrangé wrote:
..
-    struct pollfd *pfd = NULL;
+    struct pollfd *pfd = NULL, *heap_pfd = NULL;

g_autofree struct pollfd *heap_pdf = NULL;

...
  out:
+    g_free(heap_pfd);

This can be dropped with g_autofree usage

Yes, I know this, - this was deliberate choice.
Personally I'm just too used to old-school explicit resource deallocations.
Here, there's a single place where everything gets freed, so there's little
reason to use fancy modern automatic deallocations. To my taste anyway.
Maybe some future modifications adding some future ppoll3.. :)

Sure thing I can drop that and change it to autofree.

Should I? If that's easier in todays world :)

/mjt

Reply via email to