diff options
author | Denis Kenzior <denkenz@gmail.com> | 2019-04-29 14:26:43 -0500 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2019-04-29 14:26:43 -0500 |
commit | 1c940839bb41112611d9ddd89eec68f502f3b42b (patch) | |
tree | 0535535bc805cee8b8ee21d392ec5008565f120b /src | |
parent | 4fddd1a6ea2ae4a4f9f8349e3e3dae840b3b7e1d (diff) | |
download | ofono-1c940839bb41112611d9ddd89eec68f502f3b42b.tar.gz |
handsfree: Dereference after validating !NULL
Diffstat (limited to 'src')
-rw-r--r-- | src/handsfree.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/handsfree.c b/src/handsfree.c index 921e0bd7..dccc449c 100644 --- a/src/handsfree.c +++ b/src/handsfree.c @@ -174,7 +174,7 @@ void ofono_handsfree_battchg_notify(struct ofono_handsfree *hf, unsigned char level) { DBusConnection *conn = ofono_dbus_get_connection(); - const char *path = __ofono_atom_get_path(hf->atom); + const char *path; if (hf == NULL) return; @@ -187,6 +187,7 @@ void ofono_handsfree_battchg_notify(struct ofono_handsfree *hf, if (__ofono_atom_get_registered(hf->atom) == FALSE) return; + path = __ofono_atom_get_path(hf->atom); ofono_dbus_signal_property_changed(conn, path, OFONO_HANDSFREE_INTERFACE, "BatteryChargeLevel", DBUS_TYPE_BYTE, |