diff --git a/src/auth.c b/src/auth.c index 81ad3df4..11028054 100644 --- a/src/auth.c +++ b/src/auth.c @@ -150,7 +150,8 @@ void auth_release (auth_t *authenticator) xmlFree (authenticator->type); thread_mutex_unlock (&authenticator->lock); thread_mutex_destroy (&authenticator->lock); - free (authenticator->mount); + if (authenticator->mount) + free (authenticator->mount); free (authenticator); } diff --git a/src/cfgfile.c b/src/cfgfile.c index a911b4f5..6116c14b 100644 --- a/src/cfgfile.c +++ b/src/cfgfile.c @@ -720,8 +720,11 @@ static void _parse_mount(xmlDocPtr doc, xmlNodePtr node, { LOG_WARN("Default mount %s has mount-name set. This is not supported. Behavior may not be consistent.", mount->mountname); } - if (mount->auth) + if (mount->auth && mount->mountname) { mount->auth->mount = strdup ((char *)mount->mountname); + } else if (mount->auth && mount->mounttype == MOUNT_TYPE_DEFAULT ) { + mount->auth->mount = strdup ("(default mount)"); + } while(current) { last = current; current = current->next;