diff options
Diffstat (limited to 'epan/disabled_protos.c')
-rw-r--r-- | epan/disabled_protos.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/epan/disabled_protos.c b/epan/disabled_protos.c index d7e715fe4f..a558aaf48d 100644 --- a/epan/disabled_protos.c +++ b/epan/disabled_protos.c @@ -355,7 +355,7 @@ read_protos_list_file(const char *ff_path, FILE *ff, GList **flp) prot_name[prot_name_index] = '\0'; /* Add the new protocol to the list of disabled protocols */ - prot = (protocol_def *) g_malloc(sizeof(protocol_def)); + prot = g_new(protocol_def, 1); prot->name = g_strdup(prot_name); *flp = g_list_append(*flp, prot); } @@ -671,7 +671,7 @@ read_heur_dissector_list_file(const char *ff_path, FILE *ff, GList **flp) heuristic_name[name_index] = '\0'; /* Add the new protocol to the list of protocols */ - heur = (heur_protocol_def *) g_malloc(sizeof(heur_protocol_def)); + heur = g_new(heur_protocol_def, 1); heur->name = g_strdup(heuristic_name); heur->enabled = enabled; *flp = g_list_append(*flp, heur); |