
On 6/10/20 3:51 AM, Erik Skultety wrote:
On Wed, Jun 10, 2020 at 12:16:50AM -0400, Laine Stump wrote:
This was mostly boilerplate conversion, but in one case I needed to define several differently named char* to take the place of a single char *tmp that was re-used multiple times, and in another place there was a single char* that was used at the toplevel of the function, and then later used repeatedly inside a for loop, so I defined a new separate char* inside the loop.
Signed-off-by: Laine Stump <laine@redhat.com> ---
This should be applied on top of Dan's IPv6 NAT patch series (it was reviewing that series that showed me this file hadn't yet been converted). ...
@@ -689,14 +678,12 @@ virNetworkDHCPDefParseXML(const char *networkName,
if (server && virSocketAddrParse(&inaddr, server, AF_UNSPEC) < 0) { - VIR_FREE(file); - VIR_FREE(server); goto cleanup; }
def->bootfile = file; + file = NULL; g_steal_pointer would do as well
Reviewed-by: Erik Skultety <eskultet@redhat.com>
Well, Duh! Where was my brain while I was doing that mindless conversion?? This made me realized there's actually several places with the x = y; y = NULL; pattern associated with no-autofree'd pointers. If it's okay with you, I'll squash the following into the patch before I push it (or, if you'd prefer I can push it separately): (Thanks for the review, BTW)