diff --git a/src/detect-engine-port.c b/src/detect-engine-port.c index 01fde3d1d1..444db5daab 100644 --- a/src/detect-engine-port.c +++ b/src/detect-engine-port.c @@ -878,7 +878,8 @@ static int DetectPortParseInsertString(DetectPort **head, char *s) { error: printf("DetectPortParseInsertString error\n"); - if (ad != NULL) free(ad); + if (ad != NULL) + DetectPortFree(ad); return -1; }