[xdg-desktop-portal-gnome/wip/rishi/coverity-fixes-00: 5/5] screencastwidget: Don't leak the display_name string




commit aad306cf55ec524e09802a4ecc334062ccd47208
Author: Debarshi Ray <debarshir gnome org>
Date:   Thu Jun 30 19:36:15 2022 +0200

    screencastwidget: Don't leak the display_name string
    
    Fallout from f323c6b149381a09ef39c7ba343ac9550f3629c6
    
    https://gitlab.gnome.org/GNOME/xdg-desktop-portal-gnome/-/merge_requests/42

 src/screencastwidget.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/screencastwidget.c b/src/screencastwidget.c
index 339a9f3..0525644 100644
--- a/src/screencastwidget.c
+++ b/src/screencastwidget.c
@@ -538,7 +538,7 @@ screen_cast_widget_set_app_id (ScreenCastWidget *widget,
       if (info)
         display_name = g_app_info_get_display_name (info);
       else
-        display_name = g_strdup (app_id);
+        display_name = app_id;
       monitor_heading = g_strdup_printf (_("Select monitor to share with %s"),
                                          display_name);
       window_heading = g_strdup_printf (_("Select window to share with %s"),


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