detect/flowvar: remove extra NULL check

The fn DetectFlowvarDataFree checks if the pointer (DetectFlowvarData)
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 7c9fad27fc
commit 71339c459e

@ -192,8 +192,7 @@ static int DetectFlowvarSetup (DetectEngineCtx *de_ctx, Signature *s, const char
return 0; return 0;
error: error:
if (fd != NULL) DetectFlowvarDataFree(de_ctx, fd);
DetectFlowvarDataFree(de_ctx, fd);
if (content != NULL) if (content != NULL)
SCFree(content); SCFree(content);
return -1; return -1;
@ -272,8 +271,7 @@ int DetectFlowvarPostMatchSetup(DetectEngineCtx *de_ctx, Signature *s, uint32_t
} }
return 0; return 0;
error: error:
if (fv != NULL) DetectFlowvarDataFree(de_ctx, fv);
DetectFlowvarDataFree(de_ctx, fv);
return -1; return -1;
} }

Loading…
Cancel
Save