diff options
Diffstat (limited to 'res/res_phoneprov.c')
-rw-r--r-- | res/res_phoneprov.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/res/res_phoneprov.c b/res/res_phoneprov.c index ccaa6d246..51c03dbf9 100644 --- a/res/res_phoneprov.c +++ b/res/res_phoneprov.c @@ -1581,12 +1581,20 @@ static int extension_delete_cb(void *obj, void *arg, void *data, int flags) void ast_phoneprov_delete_extension(char *provider_name, char *macaddress) { + if (!users) { + return; + } + ao2_callback_data(users, OBJ_UNLINK | OBJ_NODATA | OBJ_MULTIPLE | OBJ_SEARCH_KEY, extension_delete_cb, macaddress, provider_name); } void ast_phoneprov_delete_extensions(char *provider_name) { + if (!users) { + return; + } + ao2_callback(users, OBJ_UNLINK | OBJ_NODATA | OBJ_MULTIPLE, extensions_delete_cb, provider_name); } |