[libvirt] [PATCH v5 1/5] qemuBuildChrDeviceCommandLine: Don't leak devstr
Michal Privoznik
mprivozn at redhat.com
Mon Jul 15 14:29:12 UTC 2013
On 15.07.2013 15:18, John Ferlan wrote:
> On 07/15/2013 08:11 AM, Daniel P. Berrange wrote:
>> On Fri, Jul 12, 2013 at 07:23:58PM +0200, Michal Privoznik wrote:
>>> It's caller's responsibility to free return value of
>>> qemuBuildChrDeviceStr().
>>> ---
>>> src/qemu/qemu_command.c | 1 +
>>> 1 file changed, 1 insertion(+)
>>>
>>> diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
>>> index 0e517f2..d6ef9cd 100644
>>> --- a/src/qemu/qemu_command.c
>>> +++ b/src/qemu/qemu_command.c
>>> @@ -6608,6 +6608,7 @@ qemuBuildChrDeviceCommandLine(virCommandPtr cmd,
>>> return -1;
>>>
>>> virCommandAddArgList(cmd, "-device", devstr, NULL);
>>> + VIR_FREE(devstr);
>>> return 0;
>>> }
>>
>> ACK, When was this leak introduced ? Or rather, does this need to
>> go in any -maint branch.
>
> Introduced in the v4 of the series -
>
> https://www.redhat.com/archives/libvir-list/2013-July/msg00656.html
>
> I had run valgrind and found/noted here:
>
> https://www.redhat.com/archives/libvir-list/2013-July/msg00823.html
>
> John
I've pushed this one now.
Michal
More information about the libvir-list
mailing list