diff options
| author | Akihiko Odaki <akihiko.odaki@daynix.com> | 2023-08-22 17:31:04 +0100 |
|---|---|---|
| committer | Peter Maydell <peter.maydell@linaro.org> | 2023-08-22 17:31:04 +0100 |
| commit | 4625742cd2aeb1400407889a2f7a5b4c75437818 (patch) | |
| tree | 982314f79967682604f0673e8408654c9f43439f /accel/kvm/kvm-all.c | |
| parent | bc3e41a0e8a3c932733dd363dfcfb38bf167b707 (diff) | |
| download | focaccia-qemu-4625742cd2aeb1400407889a2f7a5b4c75437818.tar.gz focaccia-qemu-4625742cd2aeb1400407889a2f7a5b4c75437818.zip | |
accel/kvm: Free as when an error occurred
An error may occur after s->as is allocated, for example if the KVM_CREATE_VM ioctl call fails. Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com> Message-id: 20230727073134.134102-6-akihiko.odaki@daynix.com Reviewed-by: Peter Maydell <peter.maydell@linaro.org> [PMM: tweaked commit message] Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'accel/kvm/kvm-all.c')
| -rw-r--r-- | accel/kvm/kvm-all.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c index 3bac5aa678..ed30f4135b 100644 --- a/accel/kvm/kvm-all.c +++ b/accel/kvm/kvm-all.c @@ -2765,6 +2765,7 @@ err: if (s->fd != -1) { close(s->fd); } + g_free(s->as); g_free(s->memory_listener.slots); return ret; |