aboutsummaryrefslogtreecommitdiffstats
path: root/swaybar/tray/sni.c
diff options
context:
space:
mode:
authorLibravatar Calvin Lee <cyrus296@gmail.com>2017-07-16 17:59:16 -0700
committerLibravatar Calvin Lee <cyrus296@gmail.com>2017-07-16 19:06:24 -0700
commite8f589c3dcb11b8f2aa778380381715b680a5ec8 (patch)
tree78a234d41e62b21f65fe1026db8d005ba36aa864 /swaybar/tray/sni.c
parentMerge pull request #1279 from 4e554c4c/bad_items (diff)
downloadsway-e8f589c3dcb11b8f2aa778380381715b680a5ec8.tar.gz
sway-e8f589c3dcb11b8f2aa778380381715b680a5ec8.tar.zst
sway-e8f589c3dcb11b8f2aa778380381715b680a5ec8.zip
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) {
160 dirty = true; 160 dirty = true;
161 161
162 dbus_message_unref(reply); 162 dbus_message_unref(reply);
163 dbus_pending_call_unref(pending);
163 return; 164 return;
164 } else { 165 } else {
165 sway_log(L_ERROR, "Could not create image surface"); 166 sway_log(L_ERROR, "Could not create image surface");
@@ -170,6 +171,7 @@ bail:
170 if (reply) { 171 if (reply) {
171 dbus_message_unref(reply); 172 dbus_message_unref(reply);
172 } 173 }
174 dbus_pending_call_unref(pending);
173 sway_log(L_ERROR, "Could not get icon from item"); 175 sway_log(L_ERROR, "Could not get icon from item");
174 return; 176 return;
175} 177}
@@ -266,6 +268,7 @@ static void reply_icon_name(DBusPendingCall *pending, void *_data) {
266 dirty = true; 268 dirty = true;
267 269
268 dbus_message_unref(reply); 270 dbus_message_unref(reply);
271 dbus_pending_call_unref(pending);
269 return; 272 return;
270 } 273 }
271 274
@@ -273,6 +276,7 @@ bail:
273 if (reply) { 276 if (reply) {
274 dbus_message_unref(reply); 277 dbus_message_unref(reply);
275 } 278 }
279 dbus_pending_call_unref(pending);
276 // Now try the pixmap 280 // Now try the pixmap
277 send_icon_msg(item); 281 send_icon_msg(item);
278 return; 282 return;