Skip to content
Snippets Groups Projects
Commit 44ce881b authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

We need to initialize the fd to -1 here (since we zero-it out the fmutex_t)

and might return before setting it to anything else.
parent d115e998
Branches
Tags
No related merge requests found
......@@ -128,6 +128,7 @@ bool _fmutex_open(const char* fname, const char* text, long max_age, bool auto_r
if(fm == NULL)
return false;
memset(fm, 0, sizeof *fm);
fm->fd = -1;
snprintf(fm->name, sizeof fm->name, fname);
if(max_age > 0) {
fm->time = fdate(fname);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment