aboutsummaryrefslogtreecommitdiffstats
path: root/epan/tvbparse.c
diff options
context:
space:
mode:
Diffstat (limited to 'epan/tvbparse.c')
-rw-r--r--epan/tvbparse.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/epan/tvbparse.c b/epan/tvbparse.c
index 91c7205baf..ade4624558 100644
--- a/epan/tvbparse.c
+++ b/epan/tvbparse.c
@@ -843,7 +843,7 @@ static int cond_handle(tvbparse_t* tt, const int offset, const tvbparse_wanted_t
}
tvbparse_wanted_t* tvbparse_handle(tvbparse_wanted_t** handle) {
- tvbparse_wanted_t* w = (tvbparse_wanted_t *)g_malloc0(sizeof(tvbparse_wanted_t));
+ tvbparse_wanted_t* w = g_new0(tvbparse_wanted_t, 1);
w->condition = cond_handle;
w->control.handle = handle;
@@ -864,7 +864,7 @@ tvbparse_wanted_t* tvbparse_end_of_buffer(const int id,
const void* data,
tvbparse_action_t before_cb,
tvbparse_action_t after_cb) {
- tvbparse_wanted_t* w = (tvbparse_wanted_t *)g_malloc0(sizeof(tvbparse_wanted_t));
+ tvbparse_wanted_t* w = g_new0(tvbparse_wanted_t, 1);
w->id = id;
w->condition = cond_end;