From 94d480536b42f3fb0c54591fbf442a91b89e9f32 Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Fri, 27 May 2011 10:17:27 +0200 Subject: [PATCH] Make sure we do all after the null check in HTPStateFree. --- src/app-layer-htp.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/app-layer-htp.c b/src/app-layer-htp.c index 3f934db6e5..05b90153ab 100644 --- a/src/app-layer-htp.c +++ b/src/app-layer-htp.c @@ -178,12 +178,15 @@ void HTPStateFree(void *state) SCEnter(); HtpState *s = (HtpState *)state; + if (s == NULL) { + SCReturn; + } /* Unset the body inspection */ s->flags &=~ HTP_FLAG_NEW_BODY_SET; /* free the connection parser memory used by HTP library */ - if (s != NULL && s->connp != NULL) { + if (s->connp != NULL) { size_t i; /* free the list of body chunks */ if (s->connp->conn != NULL) {