diff options
| author | Junio C Hamano <gitster@pobox.com> | 2022-02-25 15:47:36 -0800 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2022-02-25 15:47:36 -0800 |
| commit | 0a01df08c03fe707e22795de7bd1d763ed02e9e1 (patch) | |
| tree | b9ff98081b5cacb5106d303d21378cc5aeb99278 /ref-filter.c | |
| parent | Merge branch 'jc/name-rev-stdin' (diff) | |
| parent | date API: add and use a date_mode_release() (diff) | |
| download | git-0a01df08c03fe707e22795de7bd1d763ed02e9e1.tar.gz git-0a01df08c03fe707e22795de7bd1d763ed02e9e1.zip | |
Merge branch 'ab/date-mode-release'
Plug (some) memory leaks around parse_date_format().
* ab/date-mode-release:
date API: add and use a date_mode_release()
date API: add basic API docs
date API: provide and use a DATE_MODE_INIT
date API: create a date.h, split from cache.h
cache.h: remove always unused show_date_human() declaration
Diffstat (limited to 'ref-filter.c')
| -rw-r--r-- | ref-filter.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ref-filter.c b/ref-filter.c index f7a2f17bfd..7838bd22b8 100644 --- a/ref-filter.c +++ b/ref-filter.c @@ -1251,7 +1251,7 @@ static void grab_date(const char *buf, struct atom_value *v, const char *atomnam char *zone; timestamp_t timestamp; long tz; - struct date_mode date_mode = { DATE_NORMAL }; + struct date_mode date_mode = DATE_MODE_INIT; const char *formatp; /* @@ -1276,6 +1276,7 @@ static void grab_date(const char *buf, struct atom_value *v, const char *atomnam goto bad; v->s = xstrdup(show_date(timestamp, tz, &date_mode)); v->value = timestamp; + date_mode_release(&date_mode); return; bad: v->s = xstrdup(""); |
