diff --git a/wiretap/netmon.c b/wiretap/netmon.c index 63ebb6909c..d9b258bd58 100644 --- a/wiretap/netmon.c +++ b/wiretap/netmon.c @@ -534,7 +534,7 @@ wtap_open_return_val netmon_open(wtap *wth, int *err, gchar **err_info) return WTAP_OPEN_ERROR; } - comment_rec = g_new(struct netmonrec_comment, 1); + comment_rec = g_new0(struct netmonrec_comment, 1); comment_rec->numFramePerComment = pletoh32(&comment_header.numFramePerComment); comment_rec->frameOffset = pletoh32(&comment_header.frameOffset); comment_rec->titleLength = pletoh32(&comment_header.titleLength);