Add function ssl_FreeDecodeBuffer() to release the sniffer allocated data buffer and reset the pointer.

This commit is contained in:
John Safranek
2015-10-26 12:01:21 -07:00
parent b05332c417
commit a42308e28a
3 changed files with 19 additions and 2 deletions

View File

@@ -3229,6 +3229,21 @@ int ssl_DecodePacket(const byte* packet, int length, byte** data, char* error)
}
/* Deallocator for the decoded data buffer. */
/* returns 0 on success, -1 on error */
int ssl_FreeDecodeBuffer(byte** data, char* error)
{
(void)error;
if (data != NULL) {
free(*data);
*data = NULL;
}
return 0;
}
/* Enables (if traceFile)/ Disables debug tracing */
/* returns 0 on success, -1 on error */
int ssl_Trace(const char* traceFile, char* error)