After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 741822 - Fails to build with VS 2015
Fails to build with VS 2015
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: win32
unspecified
Other Windows
: Normal normal
: ---
Assigned To: gtk-win32 maintainers
gtk-win32 maintainers
Depends on:
Blocks:
 
 
Reported: 2014-12-20 22:29 UTC by Patrick Griffis (tingping)
Modified: 2015-07-23 08:35 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Replace usage of __wgetmainargs() (5.87 KB, patch)
2014-12-21 00:10 UTC, Patrick Griffis (tingping)
committed Details | Review
Fix leak in g_win32_get_command_line() (580 bytes, patch)
2014-12-21 00:10 UTC, Patrick Griffis (tingping)
committed Details | Review

Description Patrick Griffis (tingping) 2014-12-20 22:29:55 UTC
The next release of VS 2015 removes the internal function __wgetmainargs(). This is used in gspawn-win32-helper.c (also in gio/tests/gio-du.c) and I believe could easily be replaced with g_win32_get_command_line ().
Comment 1 Patrick Griffis (tingping) 2014-12-21 00:10:36 UTC
Created attachment 293137 [details] [review]
Replace usage of __wgetmainargs()
Comment 2 Patrick Griffis (tingping) 2014-12-21 00:10:58 UTC
Created attachment 293138 [details] [review]
Fix leak in g_win32_get_command_line()
Comment 3 Ignacio Casal Quinteiro (nacho) 2015-07-22 16:35:56 UTC
Review of attachment 293137 [details] [review]:

Patch looks good to me.
Comment 4 Ignacio Casal Quinteiro (nacho) 2015-07-22 16:36:25 UTC
Review of attachment 293138 [details] [review]:

Sure.
Comment 5 Patrick Griffis (tingping) 2015-07-23 08:34:30 UTC
Commited as 3cc349b04e76880a9d2f3c3d2195d171e110f66c and b65287fea54eea8979914b06ff44adea4bc809cc
Comment 6 Patrick Griffis (tingping) 2015-07-23 08:35:08 UTC
Comment on attachment 293138 [details] [review]
Fix leak in g_win32_get_command_line()

>From 7f6258782d0aa725782504532bbfba9f006e86bc Mon Sep 17 00:00:00 2001
>From: TingPing <tingping@tingping.se>
>Date: Sat, 20 Dec 2014 18:59:15 -0500
>Subject: [PATCH 2/2] win32: Fix leak in g_win32_get_command_line()
>
>---
> glib/gwin32.c | 1 +
> 1 file changed, 1 insertion(+)
>
>diff --git a/glib/gwin32.c b/glib/gwin32.c
>index ffc5fe2..b7c65bf 100644
>--- a/glib/gwin32.c
>+++ b/glib/gwin32.c
>@@ -651,5 +651,6 @@ g_win32_get_command_line (void)
>     result[i] = g_utf16_to_utf8 (args[i], -1, NULL, NULL, NULL);
>   result[i] = NULL;
> 
>+  LocalFree (args);
>   return result;
> }
>-- 
>2.1.0
>