summaryrefslogtreecommitdiffstats
path: root/util/envlist.c
diff options
context:
space:
mode:
Diffstat (limited to 'util/envlist.c')
-rw-r--r--util/envlist.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/util/envlist.c b/util/envlist.c
index 2bcc13f094..ab5553498a 100644
--- a/util/envlist.c
+++ b/util/envlist.c
@@ -217,7 +217,7 @@ envlist_to_environ(const envlist_t *envlist, size_t *count)
struct envlist_entry *entry;
char **env, **penv;
- penv = env = g_malloc((envlist->el_count + 1) * sizeof(char *));
+ penv = env = g_new(char *, envlist->el_count + 1);
for (entry = envlist->el_entries.lh_first; entry != NULL;
entry = entry->ev_link.le_next) {