- list_remove(¬ifier->node);
- if (list_is_empty(&nln->all_notifiers)) {
- nl_sock_destroy(nln->notify_sock);
- nln->notify_sock = NULL;
+ if (notifier) {
+ struct nln *nln = notifier->nln;
+
+ list_remove(¬ifier->node);
+ if (list_is_empty(&nln->all_notifiers)) {
+ nl_sock_destroy(nln->notify_sock);
+ nln->notify_sock = NULL;
+ }
+ free(notifier);