Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
[PATCH] plug memory leak in diff.c::diff_free_filepair()
[gitweb.git]
/
sha1_name.c
diff --git
a/sha1_name.c
b/sha1_name.c
index df45b172a3033cad47e5039defc6de45748aeb5f..fdd321448ce144aac87c6e5e50cbe08054951feb 100644
(file)
--- a/
sha1_name.c
+++ b/
sha1_name.c
@@
-148,7
+148,7
@@
static int get_sha1_basic(const char *str, int len, unsigned char *sha1)
};
const char **p;
- if (!get_sha1_hex(str, sha1))
+ if (
len == 40 &&
!get_sha1_hex(str, sha1))
return 0;
for (p = prefix; *p; p++) {