gss: Fix warnings

This commit is contained in:
Nicolas Williams
2021-03-27 23:28:17 -05:00
parent 65caff79a3
commit 96b7ea671d
14 changed files with 58 additions and 32 deletions

View File

@@ -56,6 +56,8 @@ from_file(const char *fn, const char *target_domain,
d = strtok_r(buf, ":", &str);
free(*domainp);
*domainp = NULL;
if (!d)
continue;
if (d && target_domain != NULL && strcasecmp(target_domain, d) != 0)
continue;
*domainp = strdup(d);