mate_setup: allocate correct amount of memory

When creating a _mate_cfg_gog, instead of
allocating space for a `_mate_cfg_gop`,
allocate space for a _mate_cfg_gog. Also, use
`g_new` instead of `gmalloc`.


(cherry picked from commit 1c7edf49f8)
This commit is contained in:
Moshe Kaplan 2020-12-22 18:36:46 +00:00 committed by Jaap Keuter
parent 54ddb2e9f9
commit 8ea18fe50c
1 changed files with 1 additions and 1 deletions

View File

@ -97,7 +97,7 @@ extern mate_cfg_gop* new_gopcfg(mate_config* mc, gchar* name) {
}
extern mate_cfg_gog* new_gogcfg(mate_config* mc, gchar* name) {
mate_cfg_gog* cfg = (mate_cfg_gog *)g_malloc(sizeof(mate_cfg_gop));
mate_cfg_gog* cfg = g_new(mate_cfg_gog, 1);
cfg->name = g_strdup(name);
cfg->last_id = 0;