Fix potential leak in socks client

PUBLISHED_FROM=2cb4449d2f36d59db2b0dc37c46b35de6a461810
This commit is contained in:
Sergey Lyubka 2017-10-19 11:58:46 +01:00 committed by Cesanta Bot
parent 598e96a0cc
commit 3b3ac48edd

View File

@ -4209,6 +4209,7 @@ static void mg_socks_if_free(struct mg_iface *iface) {
LOG(LL_DEBUG, ("%p", iface)); LOG(LL_DEBUG, ("%p", iface));
if (d != NULL) { if (d != NULL) {
socks_if_disband(d); socks_if_disband(d);
mbuf_free(&d->tmp);
MG_FREE(d->proxy_addr); MG_FREE(d->proxy_addr);
MG_FREE(d); MG_FREE(d);
iface->data = NULL; iface->data = NULL;