Merge branch 'cb/notes-freeing-always-null-fix'
Code cleanup. * cb/notes-freeing-always-null-fix: builtin/notes: remove unnecessary free
This commit is contained in:
commit
e14af5f7aa
@ -261,10 +261,8 @@ static int parse_reuse_arg(const struct option *opt, const char *arg, int unset)
|
|||||||
|
|
||||||
if (get_oid(arg, &object))
|
if (get_oid(arg, &object))
|
||||||
die(_("failed to resolve '%s' as a valid ref."), arg);
|
die(_("failed to resolve '%s' as a valid ref."), arg);
|
||||||
if (!(buf = read_object_file(&object, &type, &len))) {
|
if (!(buf = read_object_file(&object, &type, &len)))
|
||||||
free(buf);
|
|
||||||
die(_("failed to read object '%s'."), arg);
|
die(_("failed to read object '%s'."), arg);
|
||||||
}
|
|
||||||
if (type != OBJ_BLOB) {
|
if (type != OBJ_BLOB) {
|
||||||
free(buf);
|
free(buf);
|
||||||
die(_("cannot read note data from non-blob object '%s'."), arg);
|
die(_("cannot read note data from non-blob object '%s'."), arg);
|
||||||
|
Loading…
Reference in New Issue
Block a user