Fixed none freed memory.
authorDaniel Carl <danielcarl@gmx.de>
Fri, 4 Aug 2017 19:36:01 +0000 (21:36 +0200)
committerDaniel Carl <danielcarl@gmx.de>
Fri, 4 Aug 2017 19:40:20 +0000 (21:40 +0200)
The g_variant format 's' will duplicate the memory of the requested
string. Changed this to '&s' to access the serialized data direct so
there is no need to free it.

src/webextension/ext-main.c

index ef67c79..3c6383b 100644 (file)
@@ -107,7 +107,7 @@ void webkit_web_extension_initialize_with_user_data(WebKitWebExtension *extensio
     char *server_address;
     GDBusAuthObserver *observer;
 
-    g_variant_get(data, "(ms)", &server_address);
+    g_variant_get(data, "(m&s)", &server_address);
     if (!server_address) {
         g_warning("UI process did not start D-Bus server");
         return;