Re: [PATCH 1/2] hyperv: XML parsing of storage volumes

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

 



> On Nov 19, 2020, at 8:38 AM, Daniel P. Berrangé <berrange@xxxxxxxxxx> 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





[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux