summaryrefslogtreecommitdiff
path: root/src/lib/ecore_drm
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2019-08-05 14:38:10 +0100
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2019-08-05 15:00:29 +0100
commitb7bc6212bc5c71a9717e46f8a93467340e37abc6 (patch)
tree5915ed0ab697f9ff58b5020cef3dc6af5ff8206f /src/lib/ecore_drm
parent4c6a9520effd885682dd2c296978311f5b54dd79 (diff)
ecore drm legacy - fix dbus leaks of reply handle
fix CID 1402664
Diffstat (limited to 'src/lib/ecore_drm')
-rw-r--r--src/lib/ecore_drm/ecore_drm_dbus.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/lib/ecore_drm/ecore_drm_dbus.c b/src/lib/ecore_drm/ecore_drm_dbus.c
index 7f333f0..686c93c 100644
--- a/src/lib/ecore_drm/ecore_drm_dbus.c
+++ b/src/lib/ecore_drm/ecore_drm_dbus.c
@@ -176,9 +176,11 @@ _ecore_drm_dbus_session_take(void)
176 if (eldbus_message_error_get(reply, &errname, &errmsg)) 176 if (eldbus_message_error_get(reply, &errname, &errmsg))
177 { 177 {
178 ERR("Eldbus Message Error: %s %s", errname, errmsg); 178 ERR("Eldbus Message Error: %s %s", errname, errmsg);
179 eldbus_message_unref(reply);
179 return EINA_FALSE; 180 return EINA_FALSE;
180 } 181 }
181 182
183 eldbus_message_unref(reply);
182 return EINA_TRUE; 184 return EINA_TRUE;
183} 185}
184 186
@@ -207,9 +209,11 @@ _ecore_drm_dbus_session_release(void)
207 if (eldbus_message_error_get(reply, &errname, &errmsg)) 209 if (eldbus_message_error_get(reply, &errname, &errmsg))
208 { 210 {
209 ERR("Eldbus Message Error: %s %s", errname, errmsg); 211 ERR("Eldbus Message Error: %s %s", errname, errmsg);
212 eldbus_message_unref(reply);
210 return EINA_FALSE; 213 return EINA_FALSE;
211 } 214 }
212 215
216 eldbus_message_unref(reply);
213 return EINA_TRUE; 217 return EINA_TRUE;
214} 218}
215 219
@@ -316,12 +320,17 @@ _ecore_drm_dbus_device_take_no_pending(uint32_t major, uint32_t minor, Eina_Bool
316 if (eldbus_message_error_get(reply, &errname, &errmsg)) 320 if (eldbus_message_error_get(reply, &errname, &errmsg))
317 { 321 {
318 ERR("Eldbus Message Error: %s %s", errname, errmsg); 322 ERR("Eldbus Message Error: %s %s", errname, errmsg);
323 eldbus_message_unref(reply);
319 return -1; 324 return -1;
320 } 325 }
321 326
322 if (!eldbus_message_arguments_get(reply, "hb", &fd, &b)) 327 if (!eldbus_message_arguments_get(reply, "hb", &fd, &b))
323 return -1; 328 {
329 eldbus_message_unref(reply);
330 return -1;
331 }
324 332
333 eldbus_message_unref(reply);
325 if (paused_out) *paused_out = b; 334 if (paused_out) *paused_out = b;
326 return fd; 335 return fd;
327} 336}