[PATCH 3/5] virfirewalltest: Don't duplicate string when adding it onto stringlist

Pavel Hrdina phrdina at redhat.com
Fri Oct 2 09:55:15 UTC 2020


On Fri, Oct 02, 2020 at 11:22:08AM +0200, Michal Privoznik wrote:
> 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 at redhat.com>
> ---
>  tests/virfirewalltest.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Pavel Hrdina <phrdina at redhat.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20201002/171f1f03/attachment-0001.sig>


More information about the libvir-list mailing list