Skip to content
Snippets Groups Projects
Commit ada63fbb authored by Mark Spencer's avatar Mark Spencer
Browse files

Switch to vasprintf (big #398) dropping bogus free()

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1651 65c4cc65-6c06-0410-ace0-fbb531ad65f3
parent c5efc24b
No related branches found
No related tags found
No related merge requests found
......@@ -36,10 +36,10 @@
void ast_cli(int fd, char *fmt, ...)
{
char stuff[4096];
char *stuff;
va_list ap;
va_start(ap, fmt);
vsnprintf(stuff, sizeof(stuff), fmt, ap);
vasprintf(&stuff, fmt, ap);
va_end(ap);
write(fd, stuff, strlen(stuff));
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment