diff options
author | Joseph Hunkeler <jhunkeler@users.noreply.github.com> | 2024-08-07 13:52:38 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-07 13:52:38 -0400 |
commit | 99edcf7b998a1ac83b75ef3cc117c5b91c874782 (patch) | |
tree | 8548396f7db2d5603799989ea3d751b1b166c884 /src/template_func_proto.c | |
parent | 1d5e5f26014ceefd824382acec732f326d8d6ce2 (diff) | |
download | stasis-99edcf7b998a1ac83b75ef3cc117c5b91c874782.tar.gz |
Fix leaks in tpl functions (#18)
* Free the function key string in tplfunc_frame during tpl_free()
* Fix leaks in get_github_release_notes_auto_tplfunc_entrypoint():
* Free repository name
* Free list of release notes
Diffstat (limited to 'src/template_func_proto.c')
-rw-r--r-- | src/template_func_proto.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/template_func_proto.c b/src/template_func_proto.c index f29c103..92ae355 100644 --- a/src/template_func_proto.c +++ b/src/template_func_proto.c @@ -54,6 +54,7 @@ int get_github_release_notes_auto_tplfunc_entrypoint(void *frame, void *data_out strlist_append(¬es_list, note); guard_free(note); } + guard_free(repository); } } } @@ -61,5 +62,7 @@ int get_github_release_notes_auto_tplfunc_entrypoint(void *frame, void *data_out if (strlist_count(notes_list)) { *output = join(notes_list->data, "\n\n"); } + guard_strlist_free(¬es_list); + return result; } |