]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
http: fix leak of normailzed uri 8918/head
authorPhilippe Antoine <pantoine@oisf.net>
Tue, 23 May 2023 12:15:51 +0000 (14:15 +0200)
committerVictor Julien <vjulien@oisf.net>
Wed, 24 May 2023 18:10:34 +0000 (20:10 +0200)
if tx_ud == NULL, still need to free alloced normailzed uri

src/app-layer-htp.c

index 97c4ada3f4858bec150bd3b1d76c2d7f4093fcc6..3b8baae4b65a38569857adf9cbc1709f7d2f2913 100644 (file)
@@ -2335,6 +2335,7 @@ static int HTPCallbackRequestLine(htp_tx_t *tx)
 
     tx_ud = htp_tx_get_user_data(tx);
     if (unlikely(tx_ud == NULL)) {
+        bstr_free(request_uri_normalized);
         return HTP_OK;
     }
     if (unlikely(tx_ud->request_uri_normalized != NULL))