diff options
author | Guy Harris <guy@alum.mit.edu> | 2013-01-15 23:36:48 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2013-01-15 23:36:48 +0000 |
commit | 111f8ea2bb957723670c4efd63c9e30aa5162bc6 (patch) | |
tree | 54e9a776a6b11121a80ce85f1e4c4e6a1732df4d | |
parent | 92b524bb1ce79b4aacf0cc38daad726c5cbf3708 (diff) | |
download | wireshark-111f8ea2bb957723670c4efd63c9e30aa5162bc6.tar.gz |
Use GLib "return an allocated string generated by printf-style
formatting" routines and the corresponding deallocate routines.
svn path=/trunk/; revision=47106
-rw-r--r-- | wsutil/crash_info.c | 8 |
1 files changed, 4 insertions, 4 deletions
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); } } |