aboutsummaryrefslogtreecommitdiff
path: root/src/report.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/report.c')
-rw-r--r--src/report.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/report.c b/src/report.c
index 84a9592..b09c7c7 100644
--- a/src/report.c
+++ b/src/report.c
@@ -25,28 +25,31 @@ report_init ()
{
if (!report_stk_inited)
obstack_init (&report_stk);
else
obstack_free (&report_stk, report_string);
}
void
report_add (const char *fmt, ...)
{
va_list ap;
char *str = NULL;
+ size_t size = 0;
+
va_start (ap, fmt);
- vasprintf (&str, fmt, ap);
+ grecs_vasprintf (&str, &size, fmt, ap);
va_end (ap);
if (str)
{
obstack_grow (&report_stk, str, strlen (str));
obstack_1grow (&report_stk, '\n');
}
+ free (str);
}
void
report_finish ()
{
obstack_1grow (&report_stk, 0);
report_string = obstack_finish (&report_stk);
}

Return to:

Send suggestions and report system problems to the System administrator.