]> git.ipfire.org Git - thirdparty/libvirt.git/commit
remote: Resolve resource leak
authorJohn Ferlan <jferlan@redhat.com>
Mon, 17 Dec 2018 12:07:44 +0000 (07:07 -0500)
committerJohn Ferlan <jferlan@redhat.com>
Tue, 18 Dec 2018 15:12:09 +0000 (10:12 -0500)
commiteb448cb5c0e143db57aa57ae760717dc969a4eef
treeee4bc7212415df8064cfd5375f27e062a80a79b4
parent44d0db011d9ff54cc63564af9d8039c89e830281
remote: Resolve resource leak

Using a combination of VIR_ALLOC and VIR_STRDUP into a local
variable and then jumping to error on the VIR_STRDUP before
assiging it into the @data would cause a memory leak. Let's
just avoid that by assiging directly into @data.

Signed-off-by: John Ferlan <jferlan@redhat.com>
ACKed-by: Michal Privoznik <mprivozn@redhat.com>
src/remote/remote_daemon_dispatch.c