Skip to content

Commit

Permalink
mx_flock: Don't call _flock_free to early
Browse files Browse the repository at this point in the history
Don't call _flock_free before flock->fname has been initialized.
  • Loading branch information
donald committed Feb 21, 2022
1 parent 3ce871a commit 76b7022
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mx_flock.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ struct mx_flock *mx_flock(int operation, char *fmt, ...)

if (res == -1) {
mx_log_err("vasprintf(): %m");
_flock_free(lock);
free(lock);
return NULL;
}

Expand Down

0 comments on commit 76b7022

Please sign in to comment.