Skip to content

Commit

Permalink
fix coverity issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabian Mauchle committed May 5, 2021
1 parent ab7a2ea commit 737be43
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions radsecproxy.c
Original file line number Diff line number Diff line change
Expand Up @@ -2169,11 +2169,15 @@ int dynamicconfig(struct server *server) {
debug(DBG_WARN, "dynamicconfig: command did not return anything in time");
kill(pid, SIGKILL);
} else {
pushgconffile(&cf, pipein, conf->dynamiclookupcommand);
ok = getgenericconfig(&cf, NULL, "Server", CONF_CBK, confserver_cb, (void *) conf, NULL);
freegconf(&cf);
pipein = pushgconffile(&cf, pipein, conf->dynamiclookupcommand);
if (pipein) {
ok = getgenericconfig(&cf, NULL, "Server", CONF_CBK, confserver_cb, (void *) conf, NULL);
freegconf(&cf);
pipein = NULL;
}
}
fclose(pipein);
if (pipein)
fclose(pipein);

if (waitpid(pid, &status, 0) < 0) {
debugerrno(errno, DBG_ERR, "dynamicconfig: wait error");
Expand Down

0 comments on commit 737be43

Please sign in to comment.