diff options
author | Peter Maydell | 2016-08-08 13:41:38 +0200 |
---|---|---|
committer | Peter Maydell | 2016-08-08 13:41:38 +0200 |
commit | 9efaf7f5f5729f7fa8dcf413fabe3d46ad382f90 (patch) | |
tree | deb4bd2faa2a2707c11a2f6458d19d8d46269896 /numa.c | |
parent | Merge remote-tracking branch 'remotes/dgibson/tags/ppc-for-2.7-20160808' into... (diff) | |
parent | ahci: fix sglist leak on retry (diff) | |
download | qemu-9efaf7f5f5729f7fa8dcf413fabe3d46ad382f90.tar.gz qemu-9efaf7f5f5729f7fa8dcf413fabe3d46ad382f90.tar.xz qemu-9efaf7f5f5729f7fa8dcf413fabe3d46ad382f90.zip |
Merge remote-tracking branch 'remotes/elmarco/tags/leaks-for-2.7-pull-request' into staging
# gpg: Signature made Sun 07 Aug 2016 21:03:14 BST
# gpg: using RSA key 0xDAE8E10975969CE5
# gpg: Good signature from "Marc-André Lureau <marcandre.lureau@redhat.com>"
# gpg: aka "Marc-André Lureau <marcandre.lureau@gmail.com>"
# gpg: WARNING: This key is not certified with sufficiently trusted signatures!
# gpg: It is not certain that the signature belongs to the owner.
# Primary key fingerprint: 87A9 BD93 3F87 C606 D276 F62D DAE8 E109 7596 9CE5
* remotes/elmarco/tags/leaks-for-2.7-pull-request:
ahci: fix sglist leak on retry
usb: free leaking path
usb: free USBDevice.strings
virtio-input: free config list
qjson: free str
ahci: free irqs array
char: free MuxDriver when closing
char: free the tcp connection data when closing
numa: do not leak NumaOptions
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'numa.c')
-rw-r--r-- | numa.c | 15 |
1 files changed, 8 insertions, 7 deletions
@@ -223,14 +223,14 @@ static int parse_numa(void *opaque, QemuOpts *opts, Error **errp) } if (err) { - goto error; + goto end; } switch (object->type) { case NUMA_OPTIONS_KIND_NODE: numa_node_parse(object->u.node.data, opts, &err); if (err) { - goto error; + goto end; } nb_numa_nodes++; break; @@ -238,13 +238,14 @@ static int parse_numa(void *opaque, QemuOpts *opts, Error **errp) abort(); } - return 0; - -error: - error_report_err(err); +end: qapi_free_NumaOptions(object); + if (err) { + error_report_err(err); + return -1; + } - return -1; + return 0; } static char *enumerate_cpus(unsigned long *cpus, int max_cpus) |