diff options
| author | Eric Blake <eblake@redhat.com> | 2016-04-01 09:57:02 -0600 |
|---|---|---|
| committer | Max Reitz <mreitz@redhat.com> | 2016-04-05 17:23:21 +0200 |
| commit | 95c3df5a24e2f18129b58691c2ebaf0d86808525 (patch) | |
| tree | d16c0871122bf07bb6bce744b037c3350aa23f38 /hw/display/virtio-gpu.c | |
| parent | 08db36f6ec29aff59c11c0f7524c2481d8a27636 (diff) | |
| download | focaccia-qemu-95c3df5a24e2f18129b58691c2ebaf0d86808525.tar.gz focaccia-qemu-95c3df5a24e2f18129b58691c2ebaf0d86808525.zip | |
crypto: Avoid memory leak on failure
Commit 7836857 introduced a memory leak due to invalid use of Error vs. visit_type_end(). If visiting the intermediate members fails, we clear the error and unconditionally use visit_end_struct() on the same error object; but if that cleanup succeeds, we then skip the qapi_free call. Until a later patch adds visit_check_struct(), the only safe approach is to use two separate error objects. Signed-off-by: Eric Blake <eblake@redhat.com> Message-id: 1459526222-30052-1-git-send-email-eblake@redhat.com Signed-off-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'hw/display/virtio-gpu.c')
0 files changed, 0 insertions, 0 deletions