http_static: fix reply data leak 69/41169/1
authorFlorin Coras <fcoras@cisco.com>
Thu, 20 Jun 2024 21:58:54 +0000 (14:58 -0700)
committerFlorin Coras <fcoras@cisco.com>
Thu, 20 Jun 2024 21:59:43 +0000 (14:59 -0700)
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ica78044b044a78714dd9947620250f13c63320fb

src/plugins/http_static/static_server.c

index c4284a4..2622498 100644 (file)
@@ -456,6 +456,8 @@ hss_ts_rx_callback (session_t *ts)
   int rv;
 
   hs = hss_session_get (ts->thread_index, ts->opaque);
+  if (hs->free_data)
+    vec_free (hs->data);
   hs->data = 0;
 
   /* Read the http message header */