summaryrefslogtreecommitdiff
path: root/src/lib/elput/elput_logind.c
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2017-07-12 11:02:16 -0400
committerChris Michael <cp.michael@samsung.com>2017-07-12 11:02:16 -0400
commitc45da5c138dca2b9ff26143572c8aee76736a9e7 (patch)
tree06100eba7fa91146b31a9dc8c3a6b1b583db79f8 /src/lib/elput/elput_logind.c
parentcd615667d56ae5c165ff61a6b56798d078999ada (diff)
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>
Diffstat (limited to 'src/lib/elput/elput_logind.c')
-rw-r--r--src/lib/elput/elput_logind.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/lib/elput/elput_logind.c b/src/lib/elput/elput_logind.c
index e93633edc1..aa9006e5bb 100644
--- a/src/lib/elput/elput_logind.c
+++ b/src/lib/elput/elput_logind.c
@@ -196,7 +196,10 @@ _logind_session_object_path_get(Elput_Manager *em)
196 goto message_fail; 196 goto message_fail;
197 } 197 }
198 if (!eldbus_message_arguments_get(reply, "o", &str)) 198 if (!eldbus_message_arguments_get(reply, "o", &str))
199 {
200 eldbus_message_unref(reply);
199 goto message_fail; 201 goto message_fail;
202 }
200 203
201 em->dbus.path = strdup(str); 204 em->dbus.path = strdup(str);
202 eldbus_message_unref(reply); 205 eldbus_message_unref(reply);