MT#61757 fix possible resource leak

Change-Id: I0fe470f10fafda46529c3844a72091dd07acc7b3
Warned-by: Coverity
mr13.2.1
Richard Fuchs 2 years ago
parent ed0e5bf71e
commit 74f3ce29ba

@ -1739,6 +1739,7 @@ bool cdr_write_error_record(const char *fn, const char *s, size_t len) {
if (fprintf(fp, "%.*s\n", (int) len, s) <= 0) {
L_CRITICAL("Failed to write to CDR error file: %s", strerror(errno));
critical("Failed to write to CDR error file, check log file for more details");
fclose(fp);
return false;
}
if (fclose(fp)) {

Loading…
Cancel
Save