From 60f33b658190ea4d016f3cb535199d15e14d2d87 Mon Sep 17 00:00:00 2001 From: Pascal Quantin Date: Wed, 17 Jun 2015 19:55:19 +0200 Subject: Qt: fix a crash when closing application under Windows QCoreApplication visits eldritch horrors upon argv on Windows. Keep a local copy for our own processing. --- [ Pascal's original comments ] g6c4ec4a introduced the use of arg_list_utf_16to8 that triggers a crash on my computer when freeing the g_allocated memory. Let's do a similar work but with a memory allocator that does not trigger an exception. Also fix a memory leak in arg_list_utf_16to8 while we are at it. Change-Id: I93d899af20b09c9a5d584a46297f715591502df9 Reviewed-on: https://code.wireshark.org/review/8961 Reviewed-by: Pascal Quantin Reviewed-by: Gerald Combs Reviewed-by: Guy Harris --- wsutil/unicode-utils.c | 1 + 1 file changed, 1 insertion(+) (limited to 'wsutil/unicode-utils.c') diff --git a/wsutil/unicode-utils.c b/wsutil/unicode-utils.c index c0f4846997..688de92843 100644 --- a/wsutil/unicode-utils.c +++ b/wsutil/unicode-utils.c @@ -166,6 +166,7 @@ arg_list_utf_16to8(int argc, char *argv[]) { argv[i] = g_utf16_to_utf8(wc_argv[i], -1, NULL, NULL, NULL); } } /* XXX else bail because something is horribly, horribly wrong? */ + LocalFree(wc_argv); } #endif -- cgit v1.2.3