diff options
author | Guillaume Nault <g.nault@alphalink.fr> | 2012-12-10 13:29:01 +0100 |
---|---|---|
committer | Kozlov Dmitry <xeb@mail.ru> | 2012-12-14 20:48:35 +0400 |
commit | 5195e2c34c33cc81fb4ca1995decf1b7dc863aab (patch) | |
tree | 0a0b716c4fac92274038b0ad63df791863552f6c | |
parent | e72a1dc9c479673f93127711e512ef26ec6f02ce (diff) | |
download | accel-ppp-5195e2c34c33cc81fb4ca1995decf1b7dc863aab.tar.gz accel-ppp-5195e2c34c33cc81fb4ca1995decf1b7dc863aab.zip |
Fix va_end() missing calls
A few va_start() calls aren't followed by their corresponding va_end().
This patch adds the missing va_end() calls.
Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
-rw-r--r-- | accel-pppd/cli/cli.c | 2 | ||||
-rw-r--r-- | accel-pppd/pwdb.c | 6 | ||||
-rw-r--r-- | accel-pppd/triton/log.c | 2 |
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); } |