summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2017-01-25 09:01:12 -0500
committerChris Michael <cp.michael@samsung.com>2017-01-25 09:09:38 -0500
commit358b4b9a9ad748c67a205c6040cc143a3b9a021a (patch)
tree448b726da16d69bdc505a9a36d65772cf2ed6dab /src/lib
parentf1c9088c14f2527fd9040c7b48f88d2597aeab10 (diff)
elput: Fix resource leak
Coverity reports that we leak 'msg' here if we fail to append arguments to the message. Fixes CID1367499 @fix Signed-off-by: Chris Michael <cp.michael@samsung.com>
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/elput/elput_logind.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/elput/elput_logind.c b/src/lib/elput/elput_logind.c
index cf5c631b39..25034480d2 100644
--- a/src/lib/elput/elput_logind.c
+++ b/src/lib/elput/elput_logind.c
@@ -600,7 +600,10 @@ _logind_vt_set(Elput_Manager *em, int vt)
600 if (!msg) return EINA_FALSE; 600 if (!msg) return EINA_FALSE;
601 601
602 if (!eldbus_message_arguments_append(msg, "u", vt)) 602 if (!eldbus_message_arguments_append(msg, "u", vt))
603 return EINA_FALSE; 603 {
604 eldbus_message_unref(msg);
605 return EINA_FALSE;
606 }
604 607
605 eldbus_connection_send(em->dbus.conn, msg, NULL, NULL, -1); 608 eldbus_connection_send(em->dbus.conn, msg, NULL, NULL, -1);
606 609