Skip to content

Commit

Permalink
MT#55283 fix double-free bug
Browse files Browse the repository at this point in the history
fixes #1688

Change-Id: If1a73381bae0d4f475237b65f0978c33e088cfb6
  • Loading branch information
rfuchs committed Jul 5, 2023
1 parent a92d79e commit b3c9278
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion recording-daemon/stream.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,13 @@ static void stream_handler(handler_t *handler) {
packet_process(stream, buf, ret); // consumes buf
else
free(buf);

buf = NULL;
}

pthread_mutex_unlock(&stream->lock);
free(buf);
if (buf)
free(buf);
log_info_call = NULL;
log_info_stream = NULL;
}
Expand Down

0 comments on commit b3c9278

Please sign in to comment.