[NetworkManager-openvpn] editor: fix memory corruption when creating advanced dialog



commit a41d93ee654cb77ba117c648006abce5654a053c
Author: Beniamino Galvani <bgalvani redhat com>
Date:   Thu Oct 11 00:58:27 2018 +0200

    editor: fix memory corruption when creating advanced dialog
    
    @contype must be cloned because the caller
    (advanced_button_clicked_cb()) deallocates it.
    
    Fixes: d0f56b5e7a70ddfdb83f8fd4120fcbd73c8ba281

 properties/nm-openvpn-editor.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/properties/nm-openvpn-editor.c b/properties/nm-openvpn-editor.c
index e395913..7d5192c 100644
--- a/properties/nm-openvpn-editor.c
+++ b/properties/nm-openvpn-editor.c
@@ -1488,7 +1488,7 @@ advanced_dialog_new (GHashTable *hash, const char *contype)
 
        g_object_set_data_full (G_OBJECT (dialog), "builder",
                                builder, (GDestroyNotify) g_object_unref);
-       g_object_set_data (G_OBJECT (dialog), "connection-type", GINT_TO_POINTER (contype));
+       g_object_set_data_full (G_OBJECT (dialog), "connection-type", g_strdup (contype), g_free);
 
        ok_button = GTK_WIDGET (gtk_builder_get_object (builder, "ok_button"));
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]