From: Victor Julien Date: Thu, 15 Sep 2022 15:25:49 +0000 (+0200) Subject: htp: remove user setup from request line callback X-Git-Tag: suricata-7.0.0-beta1~230 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=18e63d4ede44972de8c3750027a3882b526cb6b4;p=thirdparty%2Fsuricata.git htp: remove user setup from request line callback This used to be the first callback that was called, but its not anymore. Codecov confirmed that this is no longer used and therefore not useful. --- diff --git a/src/app-layer-htp.c b/src/app-layer-htp.c index d7d9233d59..cf8123b9a7 100644 --- a/src/app-layer-htp.c +++ b/src/app-layer-htp.c @@ -2310,14 +2310,8 @@ static int HTPCallbackRequestLine(htp_tx_t *tx) return HTP_OK; tx_ud = htp_tx_get_user_data(tx); - if (likely(tx_ud == NULL)) { - tx_ud = HTPMalloc(sizeof(*tx_ud)); - if (unlikely(tx_ud == NULL)) { - bstr_free(request_uri_normalized); - return HTP_OK; - } - memset(tx_ud, 0, sizeof(*tx_ud)); - htp_tx_set_user_data(tx, tx_ud); + if (unlikely(tx_ud == NULL)) { + return HTP_OK; } if (unlikely(tx_ud->request_uri_normalized != NULL)) bstr_free(tx_ud->request_uri_normalized);