summaryrefslogtreecommitdiff
path: root/modules/computer
diff options
context:
space:
mode:
Diffstat (limited to 'modules/computer')
-rw-r--r--modules/computer/memory.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/modules/computer/memory.c b/modules/computer/memory.c
index 44b83df4..dc8599c2 100644
--- a/modules/computer/memory.c
+++ b/modules/computer/memory.c
@@ -33,7 +33,10 @@ computer_get_memory(void)
while (fgets(buffer, 128, procmem)) {
gchar **tmp = g_strsplit(buffer, ":", 2);
-
+ if (tmp[1] == NULL) {
+ g_strfreev(tmp);
+ continue;
+ }
tmp[0] = g_strstrip(tmp[0]);
tmp[1] = g_strstrip(tmp[1]);