pn.if_fcslen = -1;
pn.version_major = -1;
pn.version_minor = -1;
- pn.interfaces = g_array_new(FALSE, FALSE, sizeof(interface_info_t));
-
+ pn.interfaces = NULL;
/* we don't expect any packet blocks yet */
wblock.frame_buffer = NULL;
/*
* At this point, we've decided this is a pcap-NG file, not
- * some other type of file, so we can't return 0, as that
- * means "this isn't a pcap-NG file, try some other file
- * type".
+ * some other type of file, so we can't return WTAP_OPEN_NOT_MINE
+ * past this point.
*/
wth->shb_hdr.opt_comment = wblock.data.section.opt_comment;
wth->shb_hdr.shb_hardware = wblock.data.section.shb_hardware;
pcapng = (pcapng_t *)g_malloc(sizeof(pcapng_t));
wth->priv = (void *)pcapng;
*pcapng = pn;
+ pcapng->interfaces = g_array_new(FALSE, FALSE, sizeof(interface_info_t));
wth->subtype_read = pcapng_read;
wth->subtype_seek_read = pcapng_seek_read;