You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by pk...@apache.org on 2022/06/17 05:36:05 UTC

[incubator-nuttx-apps] branch master updated: webclient_abort: Fix a resource leak for the tunneling case

This is an automated email from the ASF dual-hosted git repository.

pkarashchenko pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git


The following commit(s) were added to refs/heads/master by this push:
     new eece4a5ca webclient_abort: Fix a resource leak for the tunneling case
eece4a5ca is described below

commit eece4a5ca093b861765e20fe5d7e6f742904ceeb
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Fri Jun 17 12:54:16 2022 +0900

    webclient_abort: Fix a resource leak for the tunneling case
---
 netutils/webclient/webclient.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/netutils/webclient/webclient.c b/netutils/webclient/webclient.c
index 6cbbc742a..1bcdd3817 100644
--- a/netutils/webclient/webclient.c
+++ b/netutils/webclient/webclient.c
@@ -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);
 }