summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2010-06-17 21:31:32 +0300
committerJohan Hedberg <johan.hedberg@nokia.com>2010-06-17 21:31:32 +0300
commitb2d85659223b628d17bb5f69e00d6f514761cba6 (patch)
tree914905d1811751b129c2272a4af38446fa35a9af
parent331c7dfa40c149f02686dd0da426d618140be037 (diff)
downloadbluez-b2d85659223b628d17bb5f69e00d6f514761cba6.tar.gz
Fix missing error check to dbus_message_get_args
-rw-r--r--audio/telephony-maemo6.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/audio/telephony-maemo6.c b/audio/telephony-maemo6.c
index 41950be90..e8b75fd5a 100644
--- a/audio/telephony-maemo6.c
+++ b/audio/telephony-maemo6.c
@@ -1311,9 +1311,12 @@ static void hal_battery_level_reply(DBusPendingCall *call, void *user_data)
goto done;
}
- dbus_message_get_args(reply, NULL,
+ if (!dbus_message_get_args(reply, NULL,
DBUS_TYPE_INT32, &level,
- DBUS_TYPE_INVALID);
+ DBUS_TYPE_INVALID)) {
+ error("Unexpected args in hald reply");
+ goto done;
+ }
*value = (int) level;