summaryrefslogtreecommitdiff
path: root/usr.bin/cvs/conf.y
diff options
context:
space:
mode:
authorPatrick Latifi <pat@cvs.openbsd.org>2004-11-28 15:12:18 +0000
committerPatrick Latifi <pat@cvs.openbsd.org>2004-11-28 15:12:18 +0000
commitc6bb5516772f641d8c7cdc213f9c7712ea5a33c0 (patch)
tree82fc68bd84af8a4d48f3a54040527e2ef47f1bc4 /usr.bin/cvs/conf.y
parentb4083bdd9e35a8a9ff1611292ce4b3e9c2cce55e (diff)
make sure va_end() is always called in all possible paths
ok jfb
Diffstat (limited to 'usr.bin/cvs/conf.y')
-rw-r--r--usr.bin/cvs/conf.y8
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/cvs/conf.y b/usr.bin/cvs/conf.y
index 57cb242cf2f..54bd91070a0 100644
--- a/usr.bin/cvs/conf.y
+++ b/usr.bin/cvs/conf.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: conf.y,v 1.4 2004/11/26 16:23:50 jfb Exp $ */
+/* $OpenBSD: conf.y,v 1.5 2004/11/28 15:12:17 pat Exp $ */
/*
* Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
* All rights reserved.
@@ -504,16 +504,16 @@ yyerror(const char *fmt, ...)
char *nfmt;
va_list vap;
- va_start(vap, fmt);
-
if (asprintf(&nfmt, "%s:%d: %s", conf_file, yylval.lineno, fmt) == -1) {
cvs_log(LP_ERRNO, "failed to allocate message buffer");
return (-1);
}
+
+ va_start(vap, fmt);
cvs_vlog(LP_ERR, nfmt, vap);
+ va_end(vap);
free(nfmt);
- va_end(vap);
return (0);
}