From 18e63d4ede44972de8c3750027a3882b526cb6b4 Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Thu, 15 Sep 2022 17:25:49 +0200 Subject: [PATCH] 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. --- src/app-layer-htp.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) 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);