Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
commit_lock_file(): die() if called for unlocked lockfile object
[gitweb.git]
/
lockfile.c
diff --git
a/lockfile.c
b/lockfile.c
index e148227fb16c7e99b7a10e203cdf65f011823dea..c897dd8a9390b508ef23c7afbae46c0c40ae3e6d 100644
(file)
--- a/
lockfile.c
+++ b/
lockfile.c
@@
-301,6
+301,9
@@
int commit_lock_file(struct lock_file *lk)
{
char result_file[PATH_MAX];
+ if (!lk->filename[0])
+ die("BUG: attempt to commit unlocked object");
+
if (close_lock_file(lk))
return -1;