mirror of git://git.sysmocom.de/ofono
simfs: Prevent a crash in sim_fs_notify_file_watches
If no file watchers have ever been added, context->file_watches is NULL and sim_fs_notify_file_watches() should take that into account.
This commit is contained in:
parent
2d6c4f9d02
commit
440c9bec88
|
@ -226,6 +226,9 @@ void sim_fs_notify_file_watches(struct sim_fs *fs, int id)
|
|||
struct ofono_sim_context *context = l->data;
|
||||
GSList *k;
|
||||
|
||||
if (context->file_watches == NULL)
|
||||
continue;
|
||||
|
||||
for (k = context->file_watches->items; k; k = k->next) {
|
||||
struct file_watch *w = k->data;
|
||||
ofono_sim_file_changed_cb_t notify = w->item.notify;
|
||||
|
|
Loading…
Reference in New Issue