[gnome-system-monitor] Free memory for CPU strings



commit 4410d75ef80f75e153f176e1e6174f302fa94321
Author: Jacob Barkdull <jacobbarkdull gmail com>
Date:   Tue Oct 20 21:58:30 2020 -0700

    Free memory for CPU strings

 src/setaffinity.cpp | 5 +++++
 1 file changed, 5 insertions(+)
---
diff --git a/src/setaffinity.cpp b/src/setaffinity.cpp
index 8433672d..2bc3977f 100644
--- a/src/setaffinity.cpp
+++ b/src/setaffinity.cpp
@@ -206,6 +206,11 @@ set_affinity (GtkToggleButton *button,
             }
         }
 
+        /* Free memory for CPU strings */
+        for (i = 0; i < affinity->cpu_count; i++) {
+             g_free (cpu_list[i]);
+        }
+
         /* Free memory for taskset command */
         g_free (command);
         g_free (pc);


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