X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7725dc7c0a1daf8116f5d3f2bcf45557a3e7443f..3839f37ed32f788ffe3237a616ef60e93a017e4e:/src/mac/corefoundation/gsockosx.cpp diff --git a/src/mac/corefoundation/gsockosx.cpp b/src/mac/corefoundation/gsockosx.cpp index 52e9323347..628cf47786 100644 --- a/src/mac/corefoundation/gsockosx.cpp +++ b/src/mac/corefoundation/gsockosx.cpp @@ -123,7 +123,10 @@ void GSocketGUIFunctionsTableConcrete::Destroy_Socket(GSocket *socket) struct MacGSocketData *data = (struct MacGSocketData*)(socket->m_gui_dependent); if (data) { - CFRelease(data->socket); + if ( data->source ) + CFRelease(data->source); + if ( data->socket ) + CFRelease(data->socket); free(data); } }