Fix potential memory leak in ASN1 parsing code in low memory conditions

remotes/origin/master-1.1.x
Gerardo Iglesias Galvan 14 years ago committed by Victor Julien
parent 313067f47f
commit 570e0ec9e4

@ -346,6 +346,7 @@ Asn1Ctx *SCAsn1CtxNew(void) {
ac->asn1_stack = SCMalloc(sizeof(Asn1Node *) * asn1_max_frames_config);
if (ac->asn1_stack == NULL) {
SCFree(ac);
return NULL;
}
memset(ac->asn1_stack, 0, sizeof(Asn1Node *) * asn1_max_frames_config);

Loading…
Cancel
Save