Overlooked logic issue when freeing malloced buffer
This commit is contained in:
committed by
Rune Harlyk
parent
6104c54f39
commit
17de0b22af
@@ -60,7 +60,7 @@ class CommAdapterBase {
|
||||
sendToSubscribers(tag, buffer, stream.bytes_written);
|
||||
}
|
||||
|
||||
if (buffer != buffer) { // If we have malloced a buffer, free it now.
|
||||
if (pb_heap_enc_buf != buffer) { // If we have malloced a buffer, free it now.
|
||||
free(buffer);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user