index aab14fc107353099756403c1bf08a0786e184d98..5e653141ceb8183cfb7922c3ad89fd1a0110647a 100644 (file)
--- a/refs.c
+++ b/refs.c
}
lock->lk = xcalloc(1, sizeof(struct lock_file));
- lock->ref_file = strdup(path);
- lock->log_file = strdup(git_path("logs/%s", lock->ref_file + plen));
+ lock->ref_file = xstrdup(path);
+ lock->log_file = xstrdup(git_path("logs/%s", lock->ref_file + plen));
lock->force_write = lstat(lock->ref_file, &st) && errno == ENOENT;
if (safe_create_leading_directories(lock->ref_file))