diff options
Diffstat (limited to 'server/subscr.c')
-rw-r--r-- | server/subscr.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/server/subscr.c b/server/subscr.c index 600dd26..eb3ba27 100644 --- a/server/subscr.c +++ b/server/subscr.c @@ -164,26 +164,24 @@ add_subscriptions(who, subs, notice, server) && subs->dest.recip->string[0] != '@') { syslog(LOG_WARNING, "subscr unauth %s recipient %s", sender->string, subs->dest.recip->string); - free_subscriptions(subs); - free_string(sender); - return ZSRV_CLASSRESTRICTED; + free_subscription(subs); /* free this one - denied */ + continue; /* the for loop */ } acl = class_get_acl(subs->dest.classname); if (acl && !realm) { if (!access_check(sender->string, acl, SUBSCRIBE)) { syslog(LOG_WARNING, "subscr unauth %s class %s", sender->string, subs->dest.classname->string); - free_subscriptions(subs); - free_string(sender); - return ZSRV_CLASSRESTRICTED; + free_subscription(subs); /* free this one - denied */ + continue; /* the for loop */ } if (wildcard_instance == subs->dest.inst) { if (!access_check(sender->string, acl, INSTWILD)) { syslog(LOG_WARNING, "subscr unauth %s class %s wild inst", sender->string, subs->dest.classname->string); - free_subscriptions(subs); - return ZSRV_CLASSRESTRICTED; + free_subscription(subs); /* free this one - denied */ + continue; /* the for loop */ } } } @@ -194,6 +192,8 @@ add_subscriptions(who, subs, notice, server) free_subscriptions(subs); free_string(sender); return(retval); + } else { + free_subscription(subs); /* free this one, will get from ADD */ } } else { retval = triplet_register(who, &subs->dest, NULL); |