aboutsummaryrefslogtreecommitdiff
path: root/swaybar/tray/sni.c
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2017-07-16 22:25:28 -0400
committerGitHub <noreply@github.com>2017-07-16 22:25:28 -0400
commit1e13a1fd60dac491a82670826f9960d0b6f8cf7b (patch)
tree78a234d41e62b21f65fe1026db8d005ba36aa864 /swaybar/tray/sni.c
parent5675a42def79ee8c2bbac32947034f1403aba4f6 (diff)
parente8f589c3dcb11b8f2aa778380381715b680a5ec8 (diff)
Merge pull request #1283 from 4e554c4c/memory_leak
Fix memory leaks in swaybar tray
Diffstat (limited to 'swaybar/tray/sni.c')
-rw-r--r--swaybar/tray/sni.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/swaybar/tray/sni.c b/swaybar/tray/sni.c
index d9a5ca80..c9d00657 100644
--- a/swaybar/tray/sni.c
+++ b/swaybar/tray/sni.c
@@ -160,6 +160,7 @@ static void reply_icon(DBusPendingCall *pending, void *_data) {
dirty = true;
dbus_message_unref(reply);
+ dbus_pending_call_unref(pending);
return;
} else {
sway_log(L_ERROR, "Could not create image surface");
@@ -170,6 +171,7 @@ bail:
if (reply) {
dbus_message_unref(reply);
}
+ dbus_pending_call_unref(pending);
sway_log(L_ERROR, "Could not get icon from item");
return;
}
@@ -266,6 +268,7 @@ static void reply_icon_name(DBusPendingCall *pending, void *_data) {
dirty = true;
dbus_message_unref(reply);
+ dbus_pending_call_unref(pending);
return;
}
@@ -273,6 +276,7 @@ bail:
if (reply) {
dbus_message_unref(reply);
}
+ dbus_pending_call_unref(pending);
// Now try the pixmap
send_icon_msg(item);
return;