diff --git a/gtk/gtkmodules.c b/gtk/gtkmodules.c index 6fa78ea51..061873bdf 100644 --- a/gtk/gtkmodules.c +++ b/gtk/gtkmodules.c @@ -234,7 +234,7 @@ _gtk_get_module_path (const gchar *type) for (path = paths; *path; path++) count++; - result = g_new (gchar *, count * 5 + 1); + result = g_new (gchar *, count * 4 + module_path_env_dirs + 1); count = 0; for (path = paths; *path; path++)