]> git.ipfire.org Git - thirdparty/libvirt.git/commit
libxl: Allocate @libxldisk in xenParseXLDisk() on stack
authorMichal Privoznik <mprivozn@redhat.com>
Fri, 14 Jan 2022 08:51:39 +0000 (09:51 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Mon, 17 Jan 2022 08:53:45 +0000 (09:53 +0100)
commit2645c66a6cf9cd4f996c4ad3af58285e9d7b737d
tree3d52c1451fe70e6383b61b650514665ec44eed7b
parent5a1bdcfbf0c4476d9ce219314bd5e9f8c5c1a847
libxl: Allocate @libxldisk in xenParseXLDisk() on stack

In xenParseXLDisk() the @libxldisk variable (which is type of
libxl_device_disk) is allocated on heap. But this is not
necessary as nothing in the function needs that approach.

Allocate the variable on the stack and drop corresponding
VIR_FREE() call.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/libxl/xen_xl.c