Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix memory leak related to charging mode. Fixes: CID#1237447
When using charging_fallback there is a small memory leak, when querying
the usb mode. Found with coverity.

Signed-off-by: Philippe De Swert <philippe.deswert@jollamobile.com>
  • Loading branch information
philippedeswert committed Sep 9, 2014
1 parent a224c3b commit 624f621
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/usb_moded-dbus.c
Expand Up @@ -81,6 +81,7 @@ static DBusHandlerResult msg_handler(DBusConnection *const connection, DBusMessa
mode = strdup(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))
{
Expand Down

0 comments on commit 624f621

Please sign in to comment.