Make sure we don't leak memory on app layer protocols we detect, but don't parse. Fixed #132. Thanks to Gurvinder Singh for pointing out where the issue was.

remotes/origin/master-1.0.x
Victor Julien 15 years ago
parent 7c314e8d21
commit 13e6c8035d

@ -873,13 +873,8 @@ void AppLayerParserCleanupState(TcpSession *ssn)
return;
}
AppLayerProto *p = &al_proto_table[ssn->alproto];
if (p->name == NULL) {
SCLogDebug("no parser state for %"PRIu16"", ssn->alproto);
return;
}
/* free the parser protocol state */
AppLayerProto *p = &al_proto_table[ssn->alproto];
if (p->StateFree != NULL && ssn->aldata != NULL) {
if (ssn->aldata[p->storage_id] != NULL) {
SCLogDebug("calling StateFree");

Loading…
Cancel
Save