diff options
author | Junio C Hamano <gitster@pobox.com> | 2018-11-18 18:23:57 +0900 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-11-18 18:23:57 +0900 |
commit | e14af5f7aa31e4377ac016b8df83ec70de8899fd (patch) | |
tree | a0f841d41c58f44c67000f18a7db5a85642f3810 /builtin | |
parent | Merge branch 'js/rebase-r-and-merge-head' (diff) | |
parent | builtin/notes: remove unnecessary free (diff) | |
download | tgif-e14af5f7aa31e4377ac016b8df83ec70de8899fd.tar.xz |
Merge branch 'cb/notes-freeing-always-null-fix'
Code cleanup.
* cb/notes-freeing-always-null-fix:
builtin/notes: remove unnecessary free
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/notes.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/builtin/notes.c b/builtin/notes.c index 91faa514aa..c78b7a0c5b 100644 --- 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); |