signature: fix memory leak in DetectBytejumpSetup

pull/3896/head
Philippe Antoine 6 years ago committed by Victor Julien
parent 8a339e73d3
commit a370d2a91d

@ -586,6 +586,7 @@ static int DetectBytejumpSetup(DetectEngineCtx *de_ctx, Signature *s, const char
data->offset = ((DetectByteExtractData *)bed_sm->ctx)->local_id;
data->flags |= DETECT_BYTEJUMP_OFFSET_BE;
SCFree(offset);
offset = NULL;
}
sm = SigMatchAlloc();
@ -613,6 +614,9 @@ static int DetectBytejumpSetup(DetectEngineCtx *de_ctx, Signature *s, const char
ret = 0;
return ret;
error:
if (offset != NULL) {
SCFree(offset);
}
DetectBytejumpFree(data);
return ret;
}

Loading…
Cancel
Save