mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2026-02-03 23:55:05 +01:00
Add function ssl_FreeDecodeBuffer() to release the sniffer allocated data buffer and reset the pointer.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user