From 3dec7404bf59397452f3cc32fdf33b379f2546fc Mon Sep 17 00:00:00 2001 From: grunfink Date: Sun, 27 Apr 2025 05:15:32 +0200 Subject: Fixed memory leak. --- activitypub.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/activitypub.c b/activitypub.c index df68151..10e5776 100644 --- a/activitypub.c +++ b/activitypub.c @@ -1053,9 +1053,10 @@ void notify(snac *snac, const char *type, const char *utype, const char *actor, from, email, subject); xs *mailinfo = xs_dict_new(); + xs *body = xs_fmt("%s%s", header, body); mailinfo = xs_dict_append(mailinfo, "from", from); mailinfo = xs_dict_append(mailinfo, "to", email); - mailinfo = xs_dict_append(mailinfo, "body", xs_fmt("%s%s", header, body)); + mailinfo = xs_dict_append(mailinfo, "body", body); enqueue_email(mailinfo, 0); } -- cgit v1.2.3