Merge branch 'cb/notes-freeing-always-null-fix'
Code cleanup.
* cb/notes-freeing-always-null-fix:
builtin/notes: remove unnecessary free
diff --git a/builtin/notes.c b/builtin/notes.c
index 91faa51..c78b7a0 100644
--- a/builtin/notes.c
+++ b/builtin/notes.c
@@ -261,10 +261,8 @@
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);