detect-engine: free memory in error conditions (CID 1351210)

pull/1869/head
Victor Julien 10 years ago
parent 0dd81b85d4
commit b9ee86fdb4

@ -854,6 +854,9 @@ static DetectEngineCtx *DetectEngineCtxInitReal(int minimal, const char *prefix)
de_ctx->id = detect_engine_ctx_id++;
return de_ctx;
error:
if (de_ctx != NULL) {
DetectEngineCtxFree(de_ctx);
}
return NULL;
}

Loading…
Cancel
Save