[gnome-control-center] user-accounts: Fix memory corruption in the avatar popup



commit f42f39970dc6cb65c2802f2608cf6eec9cdf56af
Author: Andrea Azzarone <andrea azzarone canonical com>
Date:   Fri Mar 1 16:21:41 2019 +0000

    user-accounts: Fix memory corruption in the avatar popup
    
    Use g_object_set_data_full and g_steal_pointer to ensure the validity of the
    "filename" association.
    
    Closes: https://gitlab.gnome.org/GNOME/gnome-control-center/issues/399

 panels/user-accounts/cc-avatar-chooser.c | 4 ++--
 subprojects/libhandy                     | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/panels/user-accounts/cc-avatar-chooser.c b/panels/user-accounts/cc-avatar-chooser.c
index a6060fd09..2a75b0366 100644
--- a/panels/user-accounts/cc-avatar-chooser.c
+++ b/panels/user-accounts/cc-avatar-chooser.c
@@ -378,8 +378,8 @@ create_face_widget (gpointer item,
         gtk_image_set_pixel_size (GTK_IMAGE (image), AVATAR_CHOOSER_PIXEL_SIZE);
         gtk_widget_show (image);
 
-        g_object_set_data (G_OBJECT (image),
-                           "filename", image_path);
+        g_object_set_data_full (G_OBJECT (image),
+                                "filename", g_steal_pointer (&image_path), g_free);
 
         return image;
 }
diff --git a/subprojects/libhandy b/subprojects/libhandy
index 96c040cac..3721b490b 160000
--- a/subprojects/libhandy
+++ b/subprojects/libhandy
@@ -1 +1 @@
-Subproject commit 96c040cacdf3ae1fcef37a003199ed8b61c0fba7
+Subproject commit 3721b490b6aacd0a8c755bf445b0a91ee9c347bc


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