mirror of git://git.sysmocom.de/ofono
handsfree: Dereference after validating !NULL
This commit is contained in:
parent
4fddd1a6ea
commit
1c940839bb
|
@ -174,7 +174,7 @@ void ofono_handsfree_battchg_notify(struct ofono_handsfree *hf,
|
||||||
unsigned char level)
|
unsigned char level)
|
||||||
{
|
{
|
||||||
DBusConnection *conn = ofono_dbus_get_connection();
|
DBusConnection *conn = ofono_dbus_get_connection();
|
||||||
const char *path = __ofono_atom_get_path(hf->atom);
|
const char *path;
|
||||||
|
|
||||||
if (hf == NULL)
|
if (hf == NULL)
|
||||||
return;
|
return;
|
||||||
|
@ -187,6 +187,7 @@ void ofono_handsfree_battchg_notify(struct ofono_handsfree *hf,
|
||||||
if (__ofono_atom_get_registered(hf->atom) == FALSE)
|
if (__ofono_atom_get_registered(hf->atom) == FALSE)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
path = __ofono_atom_get_path(hf->atom);
|
||||||
ofono_dbus_signal_property_changed(conn, path,
|
ofono_dbus_signal_property_changed(conn, path,
|
||||||
OFONO_HANDSFREE_INTERFACE,
|
OFONO_HANDSFREE_INTERFACE,
|
||||||
"BatteryChargeLevel", DBUS_TYPE_BYTE,
|
"BatteryChargeLevel", DBUS_TYPE_BYTE,
|
||||||
|
|
Loading…
Reference in New Issue