Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
Merge branch 'cb/notes-freeing-always-null-fix'
author
Junio C Hamano
<gitster@pobox.com>
Sun, 18 Nov 2018 09:23:57 +0000
(18:23 +0900)
committer
Junio C Hamano
<gitster@pobox.com>
Sun, 18 Nov 2018 09:23:57 +0000
(18:23 +0900)
Code cleanup.
* cb/notes-freeing-always-null-fix:
builtin/notes: remove unnecessary free
builtin/notes.c
patch
|
blob
|
history
raw
(from parent 1:
0de3a73
)
diff --git
a/builtin/notes.c
b/builtin/notes.c
index 91faa514aaa7f83b06f8ffc9599164c366c394fb..c78b7a0c5b7fbea81320ae9873553c437d82e73e 100644
(file)
--- a/
builtin/notes.c
+++ b/
builtin/notes.c
@@
-261,10
+261,8
@@
static int parse_reuse_arg(const struct option *opt, const char *arg, int unset)
if (get_oid(arg, &object))
die(_("failed to resolve '%s' as a valid ref."), arg);
- if (!(buf = read_object_file(&object, &type, &len))) {
- free(buf);
+ if (!(buf = read_object_file(&object, &type, &len)))
die(_("failed to read object '%s'."), arg);
- }
if (type != OBJ_BLOB) {
free(buf);
die(_("cannot read note data from non-blob object '%s'."), arg);