Browse Source

MT#55283 fix double-free bug

fixes #1688

Change-Id: If1a73381bae0d4f475237b65f0978c33e088cfb6
(cherry picked from commit b3c9278f84)
mr11.4
Richard Fuchs 3 years ago
parent
commit
dc8338d5d6
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      recording-daemon/stream.c

+ 4
- 1
recording-daemon/stream.c View File

@ -81,10 +81,13 @@ static void stream_handler(handler_t *handler) {
packet_process(stream, buf, ret); // consumes buf packet_process(stream, buf, ret); // consumes buf
else else
free(buf); free(buf);
buf = NULL;
} }
pthread_mutex_unlock(&stream->lock); pthread_mutex_unlock(&stream->lock);
free(buf);
if (buf)
free(buf);
log_info_call = NULL; log_info_call = NULL;
log_info_stream = NULL; log_info_stream = NULL;
} }


Loading…
Cancel
Save