unpack-objects -r: call it "recover".
[gitweb.git] / sha1_name.c
index 3f6b77ccfadab14453a76b6654b50b186c9f5b25..1fbc4438059b68f31aa25fb8e3b82b37a4d02819 100644 (file)
@@ -279,7 +279,7 @@ static int get_sha1_basic(const char *str, int len, unsigned char *sha1)
                pathname = resolve_ref(git_path(*p, len, str), this_result, 1);
                if (pathname) {
                        if (!refs_found++)
-                               real_path = strdup(pathname);
+                               real_path = xstrdup(pathname);
                        if (!warn_ambiguous_refs)
                                break;
                }