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`.
This commit is contained in:
Moshe Kaplan 2020-12-22 13:36:46 -05:00 committed by Jaap Keuter
parent 38ab00a094
commit 1c7edf49f8
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;