summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrbuj <[email protected]>2021-10-21 16:59:29 +0200
committermbkma <[email protected]>2021-11-09 22:41:02 +0100
commit5882467c0df5c919aacd76292687064734b0ac0e (patch)
treea3152dab4aabffdc5434aa9ca91cdb52e0f907f2
parent97bfa9f2304902e0a4b09f51f6e55ac67f6b836f (diff)
downloadmate-calc-5882467c0df5c919aacd76292687064734b0ac0e.tar.bz2
mate-calc-5882467c0df5c919aacd76292687064734b0ac0e.tar.xz
unit: fix memory leak
-rw-r--r--src/unit.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/unit.c b/src/unit.c
index 8f33a10..e52d979 100644
--- a/src/unit.c
+++ b/src/unit.c
@@ -49,7 +49,7 @@ unit_new(const gchar *name,
unit->priv->to_function = g_strdup(to_function);
symbol_names = g_strsplit(symbols, ",", 0);
for (i = 0; symbol_names[i]; i++)
- unit->priv->symbols = g_list_append(unit->priv->symbols, g_strdup(symbol_names[i]));
+ unit->priv->symbols = g_list_append(unit->priv->symbols, symbol_names[i]);
g_free(symbol_names);
return unit;