Message ID | 20170509093549.25157-2-pbonzini@redhat.com |
---|---|
State | New |
Headers | show |
diff --git a/block/curl.c b/block/curl.c index 2708d57c2f..25a301e7b4 100644 --- a/block/curl.c +++ b/block/curl.c @@ -532,6 +532,11 @@ static CURLState *curl_init_state(BlockDriverState *bs, BDRVCURLState *s) static void curl_clean_state(CURLState *s) { + int j; + for (j = 0; j < CURL_NUM_ACB; j++) { + assert(!s->acb[j]); + } + if (s->s->multi) curl_multi_remove_handle(s->s->multi, s->curl);
curl_clean_state should only be called after all AIOCBs have been completed. This is not so obvious for the call from curl_detach_aio_context, so assert that. Cc: qemu-stable@nongnu.org Cc: jcody@redhat.com Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> --- block/curl.c | 5 +++++ 1 file changed, 5 insertions(+)