]> xenbits.xensource.com Git - libvirt.git/commit
vboxDumpNetworks: do not allocate def->nets upfront
authorJán Tomko <jtomko@redhat.com>
Fri, 23 Feb 2018 12:51:24 +0000 (13:51 +0100)
committerJán Tomko <jtomko@redhat.com>
Mon, 5 Mar 2018 11:57:47 +0000 (12:57 +0100)
commit4226024bfb917c62b6ea93190295a92885d619be
tree8e2d380cbcf50c3c3e04b5e60c1d882563b8a532
parent3b4f2924d8701afbbb8ae0aff158c5770b77cfc3
vboxDumpNetworks: do not allocate def->nets upfront

Use VIR_APPEND_ELEMENT instead and change the return type
to int to catch allocation errors.

This removes the need to figure out the adapter count
upfront.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
src/vbox/vbox_common.c