From: Russell Bryant Date: Thu, 27 Jul 2006 01:29:57 +0000 (+0000) Subject: fix some breakage of ast_cli() that resulted in seg faults on Josh's machine. X-Git-Tag: 1.4.0-beta1~514 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a43a350c3e654cedc0fe3a48f9e8b673ad417d92;p=thirdparty%2Fasterisk.git fix some breakage of ast_cli() that resulted in seg faults on Josh's machine. I'm not sure why this never caused problems for me ... git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38283 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/cli.c b/cli.c index f411229cd1..205ef7f7a8 100644 --- a/cli.c +++ b/cli.c @@ -88,6 +88,8 @@ void ast_cli(int fd, char *fmt, ...) } buf->len *= 2; pthread_setspecific(ast_cli_buf_key, buf); + va_end(ap); + va_start(ap, fmt); res = vsnprintf(buf->str, buf->len, fmt, ap); } va_end(ap);