summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--accel-pppd/cli/cli.c2
-rw-r--r--accel-pppd/pwdb.c6
-rw-r--r--accel-pppd/triton/log.c2
3 files changed, 8 insertions, 2 deletions
diff --git a/accel-pppd/cli/cli.c b/accel-pppd/cli/cli.c
index 917634c9..90341cd3 100644
--- a/accel-pppd/cli/cli.c
+++ b/accel-pppd/cli/cli.c
@@ -54,6 +54,8 @@ void __export cli_register_simple_cmd2(
c->hdr[i] = va_arg(ap, char *);
list_add_tail(&c->entry, &simple_cmd_list);
+
+ va_end(ap);
}
void __export cli_register_regexp_cmd(struct cli_regexp_cmd_t *cmd)
diff --git a/accel-pppd/pwdb.c b/accel-pppd/pwdb.c
index 4c0ab02e..ec1b7d10 100644
--- a/accel-pppd/pwdb.c
+++ b/accel-pppd/pwdb.c
@@ -22,11 +22,13 @@ int __export pwdb_check(struct ppp_t *ppp, const char *username, int type, ...)
r = pwdb->check(pwdb, ppp, username, type, args);
if (r == PWDB_NO_IMPL)
continue;
- if (r == PWDB_SUCCESS)
- return PWDB_SUCCESS;
res = r;
+ if (r == PWDB_SUCCESS)
+ break;
}
+ va_end(args);
+
return res;
}
__export char *pwdb_get_passwd(struct ppp_t *ppp, const char *username)
diff --git a/accel-pppd/triton/log.c b/accel-pppd/triton/log.c
index 95304284..9226e117 100644
--- a/accel-pppd/triton/log.c
+++ b/accel-pppd/triton/log.c
@@ -59,6 +59,7 @@ void triton_log_error(const char *fmt,...)
va_start(ap, fmt);
do_log(f_error, fmt, ap);
+ va_end(ap);
}
void triton_log_debug(const char *fmt,...)
@@ -70,5 +71,6 @@ void triton_log_debug(const char *fmt,...)
va_start(ap, fmt);
do_log(f_debug, fmt, ap);
+ va_end(ap);
}