webclient_abort: Fix a resource leak for the tunneling case

This commit is contained in:
YAMAMOTO Takashi
2022-06-17 12:54:16 +09:00
committed by Petro Karashchenko
parent be516e4c5e
commit eece4a5ca0

View File

@@ -2206,6 +2206,11 @@ void webclient_abort(FAR struct webclient_context *ctx)
conn_close(ctx, conn);
}
if (ws->tunnel != NULL)
{
webclient_abort(ws->tunnel);
}
free_ws(ws);
_SET_STATE(ctx, WEBCLIENT_CONTEXT_STATE_ABORTED);
}