int save_errno = errno;
error("cannot fix permission bits on %s",
lk->filename);
+ rollback_lock_file(lk);
errno = save_errno;
return -1;
}
if (!lk->filename[0])
return;
- if (lk->fd >= 0)
- close(lk->fd);
+ close_lock_file(lk);
unlink_or_warn(lk->filename);
lk->filename[0] = 0;
}