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>
This commit is contained in:
Chris Michael 2017-01-25 09:01:12 -05:00
parent f1c9088c14
commit 358b4b9a9a
1 changed files with 4 additions and 1 deletions

View File

@ -600,7 +600,10 @@ _logind_vt_set(Elput_Manager *em, int vt)
if (!msg) return EINA_FALSE;
if (!eldbus_message_arguments_append(msg, "u", vt))
return EINA_FALSE;
{
eldbus_message_unref(msg);
return EINA_FALSE;
}
eldbus_connection_send(em->dbus.conn, msg, NULL, NULL, -1);