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