mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-20 06:50:22 +03:00
Fix a memory leak in the qemudBuildCommandLine.
ADD_ARG_LIT should only be used for literal arguments, since it duplicates the memory. Since virBufferContentAndReset is already allocating memory, we should only use ADD_ARG. Signed-off-by: Chris Lalancette <clalance@redhat.com>
This commit is contained in:
parent
5cff36e39a
commit
4313e1b9b1
@ -4110,7 +4110,7 @@ int qemudBuildCommandLine(virConnectPtr conn,
|
||||
goto error;
|
||||
}
|
||||
|
||||
ADD_ARG_LIT(virBufferContentAndReset(&boot_buf));
|
||||
ADD_ARG(virBufferContentAndReset(&boot_buf));
|
||||
}
|
||||
|
||||
if (def->os.kernel) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user