[gnome-panel] run-dialog: fix memory leak



commit f5cf69b31c8713008836963e0c66ed121d5410dc
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Sun Mar 21 14:52:53 2021 +0200

    run-dialog: fix memory leak
    
    Coverity CID: #1502712

 gnome-panel/panel-run-dialog.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/gnome-panel/panel-run-dialog.c b/gnome-panel/panel-run-dialog.c
index 7244c82af..ee8da5976 100644
--- a/gnome-panel/panel-run-dialog.c
+++ b/gnome-panel/panel-run-dialog.c
@@ -1593,8 +1593,10 @@ entry_event (GtkEditable    *entry,
                while (*nospace_prefix != '\0' &&
                       g_ascii_isspace (*nospace_prefix))
                        nospace_prefix++;
-               if (*nospace_prefix == '\0')
+               if (*nospace_prefix == '\0') {
+                       g_free (prefix);
                        return FALSE;
+               }
 
                panel_run_dialog_update_completion (dialog, nospace_prefix);
                


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