Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/winegstreamer/main.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/dlls/winegstreamer/main.c b/dlls/winegstreamer/main.c index a1b1648d9d..18154fb423 100644 --- a/dlls/winegstreamer/main.c +++ b/dlls/winegstreamer/main.c @@ -262,7 +262,8 @@ static BOOL CALLBACK init_gstreamer_proc(INIT_ONCE *once, void *param, void **ct BOOL *status = param; char argv0[] = "wine"; char argv1[] = "--gst-disable-registry-fork"; - char **argv = HeapAlloc(GetProcessHeap(), 0, sizeof(char *)*3); + char *args[3]; + char **argv = args; int argc = 2; GError *err = NULL;
@@ -272,12 +273,8 @@ static BOOL CALLBACK init_gstreamer_proc(INIT_ONCE *once, void *param, void **ct argv[1] = argv1; argv[2] = NULL; *status = gst_init_check(&argc, &argv, &err); - HeapFree(GetProcessHeap(), 0, argv); - if (err) { - ERR("Failed to initialize gstreamer: %s\n", err->message); - g_error_free(err); - } - if (*status) { + if (*status) + { HINSTANCE newhandle; /* Unloading glib is a bad idea.. it installs atexit handlers, * so never unload the dll after loading */ @@ -288,6 +285,11 @@ static BOOL CALLBACK init_gstreamer_proc(INIT_ONCE *once, void *param, void **ct
start_dispatch_thread(); } + else if (err) + { + ERR("Failed to initialize gstreamer: %s\n", debugstr_a(err->message)); + g_error_free(err); + }
return TRUE; }