Mercurial > blahgd > fmt4
changeset 1126:5556e68e971c
post: don't leak parsed comment id list
Sadly, the recent commit (3f78b97b852daa40edd2808df502177391680da3) did not
fix all the reference leaks surrounding the comment ids s-expression
processing.
Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
author | Josef 'Jeff' Sipek <jeffpc@josefsipek.net> |
---|---|
date | Sat, 09 Jun 2018 20:08:53 -0400 |
parents | 9293874827bf |
children | 5125186f0d0a |
files | post.c |
diffstat | 1 files changed, 3 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/post.c Sat Jun 09 20:06:30 2018 -0400 +++ b/post.c Sat Jun 09 20:08:53 2018 -0400 @@ -208,6 +208,7 @@ str_putref(meta); } +/* consumes the struct val reference */ static void post_add_comments(struct post *post, struct val *list) { struct val *val; @@ -220,6 +221,8 @@ /* add the comment */ post_add_comment(post, val->i); } + + val_putref(list); } static int __do_load_post_body_fmt3(struct post *post, const struct str *input)