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`.
(cherry picked from commit 1c7edf49f8
)
This commit is contained in:
parent
54ddb2e9f9
commit
8ea18fe50c
|
@ -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