path: root/ref-filter.h
diff options
authorÆvar Arnfjörð Bjarmason <>2021-10-20 18:27:20 (GMT)
committerJunio C Hamano <>2021-10-20 18:36:13 (GMT)
commite5fb028688f5811bd835c0bc47f8d7a379a0d152 (patch)
treea9e8e75d8139818d8f39240d5ef5bb9ce27ac179 /ref-filter.h
parent37766b61cdb3e12709febcd2f9dbee2b90e62969 (diff)
ref-filter API user: add and use a ref_sorting_release()
Add a ref_sorting_release() and use it for some of the current API users, the ref_sorting_default() function and its siblings will do a malloc() which wasn't being free'd previously. Signed-off-by: Ævar Arnfjörð Bjarmason <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'ref-filter.h')
1 files changed, 2 insertions, 0 deletions
diff --git a/ref-filter.h b/ref-filter.h
index b636f43..6228458 100644
--- a/ref-filter.h
+++ b/ref-filter.h
@@ -127,6 +127,8 @@ void parse_ref_sorting(struct ref_sorting **sorting_tail, const char *atom);
int parse_opt_ref_sorting(const struct option *opt, const char *arg, int unset);
/* Default sort option based on refname */
struct ref_sorting *ref_default_sorting(void);
+/* Release a "struct ref_sorting" */
+void ref_sorting_release(struct ref_sorting *);
/* Function to parse --merged and --no-merged options */
int parse_opt_merge_filter(const struct option *opt, const char *arg, int unset);
/* Get the current HEAD's description */