From 111f8ea2bb957723670c4efd63c9e30aa5162bc6 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Tue, 15 Jan 2013 23:36:48 +0000 Subject: Use GLib "return an allocated string generated by printf-style formatting" routines and the corresponding deallocate routines. svn path=/trunk/; revision=47106 --- wsutil/crash_info.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'wsutil/crash_info.c') diff --git a/wsutil/crash_info.c b/wsutil/crash_info.c index 7f09436e7c..3f892a10b9 100644 --- a/wsutil/crash_info.c +++ b/wsutil/crash_info.c @@ -147,16 +147,16 @@ ws_add_crash_info(const char *fmt, ...) char *m, *old_info, *new_info; va_start(ap, fmt); - vasprintf(&m, fmt, ap); + m = g_strdup_vprintf(fmt, ap); va_end(ap); if (__crashreporter_info__ == NULL) __crashreporter_info__ = m; else { old_info = __crashreporter_info__; - asprintf(&new_info, "%s\n%s", old_info, m); - free(m); + new_info = g_strdup_printf("%s\n%s", old_info, m); + g_free(m); __crashreporter_info__ = new_info; - free(old_info); + g_free(old_info); } } -- cgit v1.2.1