Skip to content
Permalink
Browse files
[dbus] Do assign fallback mode correctly to avoid corruption
Signed-off-by: Philippe De Swert <philippe.deswert@jollamobile.com>
  • Loading branch information
philippedeswert committed Sep 16, 2014
1 parent c01a830 commit 9706a060ccdfa3781cc7953aafbe744b51d1f46c
Showing with 1 addition and 2 deletions.
  1. +1 −2 src/usb_moded-dbus.c
@@ -78,10 +78,9 @@ static DBusHandlerResult msg_handler(DBusConnection *const connection, DBusMessa

/* To the outside we want to keep CHARGING and CHARGING_FALLBACK the same */
if(!strcmp(MODE_CHARGING_FALLBACK, mode))
mode = strdup(MODE_CHARGING);
mode = MODE_CHARGING;
if((reply = dbus_message_new_method_return(msg)))
dbus_message_append_args (reply, DBUS_TYPE_STRING, &mode, DBUS_TYPE_INVALID);
free((void *)mode);
}
else if(!strcmp(member, USB_MODE_STATE_SET))
{

0 comments on commit 9706a06

Please sign in to comment.