Skip to content

Commit e14af5f

Browse files
committed
Merge branch 'cb/notes-freeing-always-null-fix'
Code cleanup. * cb/notes-freeing-always-null-fix: builtin/notes: remove unnecessary free
2 parents 0de3a73 + 9a4cb87 commit e14af5f

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

builtin/notes.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -261,10 +261,8 @@ static int parse_reuse_arg(const struct option *opt, const char *arg, int unset)
261261

262262
if (get_oid(arg, &object))
263263
die(_("failed to resolve '%s' as a valid ref."), arg);
264-
if (!(buf = read_object_file(&object, &type, &len))) {
265-
free(buf);
264+
if (!(buf = read_object_file(&object, &type, &len)))
266265
die(_("failed to read object '%s'."), arg);
267-
}
268266
if (type != OBJ_BLOB) {
269267
free(buf);
270268
die(_("cannot read note data from non-blob object '%s'."), arg);

0 commit comments

Comments
 (0)