mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-30 16:35:24 +00:00
virfirewalltest: Don't duplicate string when adding it onto stringlist
In our wrapper of g_dbus_connection_call_sync() in virfirewalltest a string is duplicated and added onto a virStringList. This leads to a memory leak because virStringListAdd() duplicates the string itself. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
This commit is contained in:
parent
2c4ebab4f5
commit
053beeb04d
@ -122,7 +122,7 @@ VIR_MOCK_WRAP_RET_ARGS(g_dbus_connection_call_sync,
|
||||
doError = true;
|
||||
}
|
||||
|
||||
virStringListAdd(&args, g_strdup(item));
|
||||
virStringListAdd(&args, item);
|
||||
}
|
||||
|
||||
if (fwBuf) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user