Skip to content

Commit

Permalink
[usb-moded] Fix possible crash if dsme is not running
Browse files Browse the repository at this point in the history
Really fix CID #1103635

Signed-off-by: Philippe De Swert <philippe.deswert@jollamobile.com>
  • Loading branch information
philippedeswert committed Oct 16, 2013
1 parent 6fa5549 commit 64946f6
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/usb_moded-dsme.c
Expand Up @@ -53,13 +53,16 @@ int is_in_user_state(void)
{
dbus_message_get_args(reply, &error, DBUS_TYPE_STRING, &buffer, DBUS_TYPE_INVALID);
dbus_message_unref(reply);
log_debug("user state = %s\n", buffer);
}
dbus_message_unref(msg);
}
dbus_connection_unref(dbus_conn);

if (strcmp(buffer, "USER")==0) ret = 1;
if(buffer)
{
log_debug("user state = %s\n", buffer);
if (strcmp(buffer, "USER")==0) ret = 1;
}
return(ret);
}

0 comments on commit 64946f6

Please sign in to comment.