Bug #168 ยป 0004-fix-smb-leak.patch
src/app-layer-smb.c | ||
---|---|---|
*/
|
||
static void SMBStateFree(void *s) {
|
||
SCEnter();
|
||
SMBState *sstate = (SMBState *) s;
|
||
DCERPCUuidEntry *item;
|
||
while ((item = TAILQ_FIRST(&sstate->dcerpc.dcerpcbindbindack.uuid_list))) {
|
||
//printUUID("Free", item);
|
||
TAILQ_REMOVE(&sstate->dcerpc.dcerpcbindbindack.uuid_list, item, next);
|
||
free(item);
|
||
}
|
||
if (sstate->dcerpc.dcerpcrequest.stub_data_buffer != NULL) {
|
||
free(sstate->dcerpc.dcerpcrequest.stub_data_buffer);
|
||
sstate->dcerpc.dcerpcrequest.stub_data_buffer = NULL;
|
||
sstate->dcerpc.dcerpcrequest.stub_data_buffer_len = 0;
|
||
}
|
||
if (sstate->dcerpc.dcerpcresponse.stub_data_buffer != NULL) {
|
||
free(sstate->dcerpc.dcerpcresponse.stub_data_buffer);
|
||
sstate->dcerpc.dcerpcresponse.stub_data_buffer = NULL;
|
||
sstate->dcerpc.dcerpcresponse.stub_data_buffer_len = 0;
|
||
}
|
||
if (s) {
|
||
SCFree(s);
|