[PATCH 1/2] hyperv: XML parsing of storage volumes
Matt Coleman
mcoleman at datto.com
Thu Nov 19 17:31:43 UTC 2020
> On Nov 19, 2020, at 8:38 AM, Daniel P. Berrangé <berrange at redhat.com> wrote:
>
> On Wed, Nov 18, 2020 at 01:48:24PM -0500, Matt Coleman wrote:
>>
>> + escapedDeviceId = g_strdup_printf("%s\"", entry->data->InstanceID);
>> + escapedDeviceId = virStringReplace(escapedDeviceId, "\\", "\\\\");
>
> This leaks the original escapedDeviceId pointer. The autofree only
> runs when variables go out of scope, not when you overwrite pointers.
>
> It'll also leak on every loop iteration.
Thanks! This will be fixed in V2.
--
Matt
More information about the libvir-list
mailing list