log-tlsstore: fix error handling

In case of realloc error, the length of the encoding buffer was not
reset and this could result in trying to write to NULL pointer.
pull/2729/head
Eric Leblond 8 years ago committed by Victor Julien
parent bf1a8d08da
commit 1655a67654

@ -132,6 +132,7 @@ static void LogTlsLogPem(LogTlsStoreLogThread *aft, const Packet *p, SSLState *s
if (ptmp == NULL) {
SCFree(aft->enc_buf);
aft->enc_buf = NULL;
aft->enc_buf_len = 0;
SCLogWarning(SC_ERR_MEM_ALLOC, "Can't allocate data for base64 encoding");
goto end_fp;
}

Loading…
Cancel
Save