Check for reply parameter being NULL before using it.
---
src/agent-connman.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/src/agent-connman.c b/src/agent-connman.c
index 203edf0..ab538f3 100644
--- a/src/agent-connman.c
+++ b/src/agent-connman.c
@@ -354,6 +354,9 @@ static void request_input_login_reply(DBusMessage *reply,
void *user_data)
char *key;
DBusMessageIter iter, dict;
+ if (!reply)
+ goto out;
+
if (dbus_message_get_type(reply) == DBUS_MESSAGE_TYPE_ERROR) {
error = dbus_message_get_error_name(reply);
goto done;
@@ -401,6 +404,8 @@ done:
username, password,
FALSE, NULL, error,
username_password_reply->user_data);
+
+out:
g_free(username_password_reply);
}
--
1.8.5.3
___
connman mailing list
connman@connman.net
https://lists.connman.net/mailman/listinfo/connman