Skip to content

Commit

Permalink
log/file: Ensure file ctx pointer is returned .
Browse files Browse the repository at this point in the history
The fix for issue 7447 introduced an error with threaded eve output.

The changes that were committed for that issue mishandled the return
value when a file is being opened for the 2nd or higher time.

Instead of returning the existing file context, null was returned.

(cherry picked from commit 1d996c5)
  • Loading branch information
jlucovsky committed Jan 13, 2025
1 parent a7ce3d4 commit f5d56ca
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/util-logopenfile.c
Original file line number Diff line number Diff line change
Expand Up @@ -735,6 +735,8 @@ LogFileCtx *LogFileEnsureExists(LogFileCtx *parent_ctx)
"Unable to open slot %d for file %s", entry->slot_number, parent_ctx->filename);
(void)HashTableRemove(parent_ctx->threads->ht, entry, 0);
}
} else {
ret_ctx = entry->ctx;
}
SCMutexUnlock(&parent_ctx->threads->mutex);

Expand Down

0 comments on commit f5d56ca

Please sign in to comment.