Skip to content

Commit

Permalink
Fix crash bug when releasing IAsyncOperation_ProxyConfiguration on WinRT
Browse files Browse the repository at this point in the history
  • Loading branch information
nmoinvaz committed Oct 26, 2023
1 parent bc297d2 commit 0e0b059
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions resolver_winrt.c
Original file line number Diff line number Diff line change
Expand Up @@ -378,10 +378,11 @@ bool proxy_resolver_winrt_delete(void **ctx) {
if (!proxy_resolver)
return false;
proxy_resolver_winrt_cancel(ctx);
if (proxy_resolver->complete_handler->async)
WinRT_IAsyncOperation_ProxyConfiguration_Release(proxy_resolver->complete_handler->async);
if (proxy_resolver->complete_handler)
if (proxy_resolver->complete_handler) {
if (proxy_resolver->complete_handler->async)
WinRT_IAsyncOperation_ProxyConfiguration_Release(proxy_resolver->complete_handler->async);
free(proxy_resolver->complete_handler);
}
event_delete(&proxy_resolver->complete);
free(proxy_resolver->list);
free(proxy_resolver);
Expand Down

0 comments on commit 0e0b059

Please sign in to comment.