elput: Fix resource leak

Coverity CID1377539 says that we leak the eldbus reply here when we
error out, so be sure to cleanup 'reply'

Fixes CID1377539

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
Chris Michael 2017-07-12 11:02:16 -04:00
parent cd615667d5
commit c45da5c138
1 changed files with 3 additions and 0 deletions

View File

@ -196,7 +196,10 @@ _logind_session_object_path_get(Elput_Manager *em)
goto message_fail;
}
if (!eldbus_message_arguments_get(reply, "o", &str))
{
eldbus_message_unref(reply);
goto message_fail;
}
em->dbus.path = strdup(str);
eldbus_message_unref(reply);