diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2015-07-15 21:06:54 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2015-07-15 21:06:54 +0100 |
commit | be0df8cd1eb8e182a9b61a2b4d1c57824cffadc4 (patch) | |
tree | 9f44d41ff26cce480db1a062a473df8cf2465406 | |
parent | 7692401a0826803522cfde533bdcc149932ddc6a (diff) | |
parent | 672558d2ea8dd782d1d2adc6e16af3bc34029a36 (diff) | |
download | qemu-be0df8cd1eb8e182a9b61a2b4d1c57824cffadc4.zip |
Merge remote-tracking branch 'remotes/ehabkost/tags/numa-pull-request' into staging
NUMA queue, 2015-07-15
# gpg: Signature made Wed Jul 15 21:01:37 2015 BST using RSA key ID 984DC5A6
# gpg: Good signature from "Eduardo Habkost <ehabkost@redhat.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: 5A32 2FD5 ABC4 D3DB ACCF D1AA 2807 936F 984D C5A6
* remotes/ehabkost/tags/numa-pull-request:
numa: Fix memory leak in numa_set_mem_node_id()
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-rw-r--r-- | numa.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -54,7 +54,7 @@ NodeInfo numa_info[MAX_NODES]; void numa_set_mem_node_id(ram_addr_t addr, uint64_t size, uint32_t node) { - struct numa_addr_range *range = g_malloc0(sizeof(*range)); + struct numa_addr_range *range; /* * Memory-less nodes can come here with 0 size in which case, @@ -64,6 +64,7 @@ void numa_set_mem_node_id(ram_addr_t addr, uint64_t size, uint32_t node) return; } + range = g_malloc0(sizeof(*range)); range->mem_start = addr; range->mem_end = addr + size - 1; QLIST_INSERT_HEAD(&numa_info[node].addr, range, entry); |