mirror of
https://github.com/git/git.git
synced 2024-11-18 17:13:55 +01:00
Merge branch 'ma/builtin-unleak'
Many variables that points at a region of memory that will live throughout the life of the program have been marked with UNLEAK marker to help the leak checkers concentrate on real leaks.. * ma/builtin-unleak: builtin/: add UNLEAKs
This commit is contained in:
commit
5261fefa4a
@ -1297,6 +1297,7 @@ int cmd_checkout(int argc, const char **argv, const char *prefix)
|
||||
strbuf_release(&buf);
|
||||
}
|
||||
|
||||
UNLEAK(opts);
|
||||
if (opts.patch_mode || opts.pathspec.nr)
|
||||
return checkout_paths(&opts, new.name);
|
||||
else
|
||||
|
@ -56,5 +56,6 @@ int cmd_diff_index(int argc, const char **argv, const char *prefix)
|
||||
return -1;
|
||||
}
|
||||
result = run_diff_index(&rev, cached);
|
||||
UNLEAK(rev);
|
||||
return diff_result_code(&rev.diffopt, result);
|
||||
}
|
||||
|
@ -464,5 +464,8 @@ int cmd_diff(int argc, const char **argv, const char *prefix)
|
||||
result = diff_result_code(&rev.diffopt, result);
|
||||
if (1 < rev.diffopt.skip_stat_unmatch)
|
||||
refresh_index_quietly();
|
||||
UNLEAK(rev);
|
||||
UNLEAK(ent);
|
||||
UNLEAK(blob);
|
||||
return result;
|
||||
}
|
||||
|
@ -494,5 +494,6 @@ int cmd_name_rev(int argc, const char **argv, const char *prefix)
|
||||
always, allow_undefined, data.name_only);
|
||||
}
|
||||
|
||||
UNLEAK(revs);
|
||||
return 0;
|
||||
}
|
||||
|
@ -552,9 +552,10 @@ int cmd_tag(int argc, const char **argv, const char *prefix)
|
||||
if (force && !is_null_oid(&prev) && oidcmp(&prev, &object))
|
||||
printf(_("Updated tag '%s' (was %s)\n"), tag, find_unique_abbrev(prev.hash, DEFAULT_ABBREV));
|
||||
|
||||
strbuf_release(&err);
|
||||
strbuf_release(&buf);
|
||||
strbuf_release(&ref);
|
||||
strbuf_release(&reflog_msg);
|
||||
UNLEAK(buf);
|
||||
UNLEAK(ref);
|
||||
UNLEAK(reflog_msg);
|
||||
UNLEAK(msg);
|
||||
UNLEAK(err);
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user