detect-mqtt: unify error handling in rule parsing

This is meant to provide a single path to the error case.
This might help make things more clear for static
checkers.
pull/5265/head
Sascha Steinbiss 4 years ago committed by Victor Julien
parent 5dc21b0e09
commit 93eef1da84

@ -154,8 +154,8 @@ static bool *DetectMQTTConnackSessionPresentParse(const char *rawstr)
return de;
error:
if (de != NULL)
SCFree(de);
/* de can't be NULL here */
SCFree(de);
return NULL;
}

@ -209,8 +209,8 @@ static DetectMQTTConnectFlagsData *DetectMQTTConnectFlagsParse(const char *rawst
return de;
error:
if (de != NULL)
SCFree(de);
/* de can't be NULL here */
SCFree(de);
return NULL;
}

@ -189,8 +189,8 @@ static DetectMQTTFlagsData *DetectMQTTFlagsParse(const char *rawstr)
return de;
error:
if (de != NULL)
SCFree(de);
/* de can't be NULL here */
SCFree(de);
return NULL;
}

Loading…
Cancel
Save