diff options
author | Pascal Quantin <pascal.quantin@gmail.com> | 2015-06-17 19:55:19 +0200 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2015-06-17 23:24:58 +0000 |
commit | 60f33b658190ea4d016f3cb535199d15e14d2d87 (patch) | |
tree | 8822853e4646c8727ca5704873b8b125a0af3627 /wsutil | |
parent | d5f1ae709b95a81dcfb26eea921d50a5b1979278 (diff) | |
download | wireshark-60f33b658190ea4d016f3cb535199d15e14d2d87.tar.gz wireshark-60f33b658190ea4d016f3cb535199d15e14d2d87.tar.bz2 wireshark-60f33b658190ea4d016f3cb535199d15e14d2d87.zip |
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 <pascal.quantin@gmail.com>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'wsutil')
-rw-r--r-- | wsutil/unicode-utils.c | 1 |
1 files changed, 1 insertions, 0 deletions
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 |