Skip to content

Commit

Permalink
Fix use after free when handling error in opening log file (#101)
Browse files Browse the repository at this point in the history
  • Loading branch information
szsam authored Jul 8, 2023
1 parent 4b15cfb commit 6db3702
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/extensions/qlog.c
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,8 @@ qlog_t *qlog(const char *filepathfmt, mode_t mode, int rotateinterval,

// try to open the log file.
if (_real_open(log) == false) {
free(log);
Q_MUTEX_DESTROY(log->qmutex);
free(log);
return NULL;
}

Expand Down

0 comments on commit 6db3702

Please sign in to comment.