failure of init_by_defaults() and incomplete cleanup there.
error:
if(rc) {
- if(channel->servers)
+ if(channel->servers) {
free(channel->servers);
+ channel->servers = NULL;
+ }
if(channel->domains && channel->domains[0])
free(channel->domains[0]);
- if(channel->domains)
+ if(channel->domains) {
free(channel->domains);
- if(channel->lookups)
+ channel->domains = NULL;
+ }
+
+ if(channel->lookups) {
free(channel->lookups);
+ channel->lookups = NULL;
+ }
}
if(hostname)