TT#14008 fix possible mem leak

Change-Id: Ie506c74e8effc9dcb88331377cdb5cff2ed0d9a4
pull/1194/head
Richard Fuchs 5 years ago
parent 7edf0c5516
commit 4f5e83e681

@ -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