Browse Source

TT#14008 fix possible mem leak

Change-Id: Ie506c74e8effc9dcb88331377cdb5cff2ed0d9a4
pull/1194/head
Richard Fuchs 5 years ago
parent
commit
4f5e83e681
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      recording-daemon/db.c

+ 2
- 0
recording-daemon/db.c View File

@ -398,10 +398,12 @@ void db_close_stream(output_t *op) {
if (stream.s) {
size_t count = fread(stream.s, 1, stream.len, f);
if (count != stream.len) {
stream.len = 0;
ilog(LOG_ERR, "Failed to read from stream");
fclose(f);
if ((output_storage & OUTPUT_STORAGE_FILE))
goto file;
free(stream.s);
return;
}
}


Loading…
Cancel
Save