[PATCH 2/4] cbs: Fix possible NULL dereference
Max Rudik <[email protected]>
| Newsgroups | dev.linux.lists.ofono |
|---|---|
| Message-ID | <[email protected]> |
---
src/cbs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/cbs.c b/src/cbs.c
index 760fd860..246157b1 100644
--- a/src/cbs.c
+++ b/src/cbs.c
@@ -593,7 +593,7 @@ static void cbs_unregister(struct ofono_atom *atom)
cbs->settings = NULL;
}
- if (cbs->netreg_watch) {
+ if (cbs->netreg_watch && cbs->netreg) {
if (cbs->location_watch) {
__ofono_netreg_remove_status_watch(cbs->netreg,
cbs->location_watch);
--
2.34.1