]> git.ipfire.org Git - thirdparty/libvirt.git/commit
nodedev: fix potential leak of command
authorJonathon Jongsma <jjongsma@redhat.com>
Tue, 20 Apr 2021 13:57:10 +0000 (08:57 -0500)
committerJonathon Jongsma <jjongsma@redhat.com>
Mon, 26 Apr 2021 17:24:22 +0000 (12:24 -0500)
commitd0913302a8590fce22b542eaea8966d5fefba47b
tree2d32548135954368aead06cbf4bba4127804e802
parent2384b6cade4c045f5fa52ebacaf2e461ef79b16b
nodedev: fix potential leak of command

When returning early due to errors, cmd will be leaked. Use an autoptr
to handle these early returns without leaking memory.

Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
src/node_device/node_device_driver.c