forked from osmocom/wireshark
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:
parent
38ab00a094
commit
1c7edf49f8
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue