detect/flowint: remove extra NULL check

The fn DetectFlowintFree checks if the pointer (DetectFlowintData)
passed to it is valid. So, the checks for NULL in the call sites can
safely be removed.
pull/14262/head
Shivani Bhardwaj 9 months ago committed by Victor Julien
parent 59944c7787
commit bc8bf865ae

@ -354,8 +354,6 @@ error:
pcre2_substring_free((PCRE2_UCHAR *)varval); pcre2_substring_free((PCRE2_UCHAR *)varval);
if (modstr) if (modstr)
pcre2_substring_free((PCRE2_UCHAR *)modstr); pcre2_substring_free((PCRE2_UCHAR *)modstr);
if (sfd != NULL)
SCFree(sfd);
return NULL; return NULL;
} }
@ -410,8 +408,7 @@ static int DetectFlowintSetup(DetectEngineCtx *de_ctx, Signature *s, const char
return 0; return 0;
error: error:
if (sfd) DetectFlowintFree(de_ctx, sfd);
DetectFlowintFree(de_ctx, sfd);
return -1; return -1;
} }

Loading…
Cancel
Save