about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorMichael Vetter <jubalh@iodoru.org>2020-04-05 19:57:56 +0200
committerGitHub <noreply@github.com>2020-04-05 19:57:56 +0200
commiteb2165e0a4469a33d0ae2b3c7878b20dbb9d52c1 (patch)
treea61b1261b4a03eda24e884eaadcf127f12355eaf /src
parent23d79e6eacbcb2e6c3c1a9ed7ac03b1b6ed97aa0 (diff)
parentded48a7e40644050a99d36375b569f581b60bb7f (diff)
downloadprofani-tty-eb2165e0a4469a33d0ae2b3c7878b20dbb9d52c1.tar.gz
Merge pull request #1298 from profanity-im/memleaks
Fix few memory leaks
Diffstat (limited to 'src')
-rw-r--r--src/ui/rosterwin.c1
-rw-r--r--src/xmpp/stanza.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/src/ui/rosterwin.c b/src/ui/rosterwin.c
index 1b4442f2..1d295053 100644
--- a/src/ui/rosterwin.c
+++ b/src/ui/rosterwin.c
@@ -562,6 +562,7 @@ _rosterwin_resources(ProfLayoutSplit *layout, PContact contact, int current_inde
 
                 wattron(layout->subwin, theme_attrs(presence_colour));
                 win_sub_print(layout->subwin, unreadmsg->str, FALSE, wrap, current_indent);
+                g_string_free(unreadmsg, TRUE);
                 wattroff(layout->subwin, theme_attrs(presence_colour));
             }
             prefs_free_string(unreadpos);
diff --git a/src/xmpp/stanza.c b/src/xmpp/stanza.c
index 06620c53..8791100b 100644
--- a/src/xmpp/stanza.c
+++ b/src/xmpp/stanza.c
@@ -2627,6 +2627,7 @@ stanza_attach_correction(xmpp_ctx_t *ctx, xmpp_stanza_t *stanza, const char *con
     xmpp_stanza_set_id(replace_stanza, replace_id);
     xmpp_stanza_set_ns(replace_stanza, STANZA_NS_LAST_MESSAGE_CORRECTION);
     xmpp_stanza_add_child(stanza, replace_stanza);
+    xmpp_stanza_release(replace_stanza);
 
     return stanza;
 }