svn path=/trunk/; revision=30023
*prev_cap_ts = fdata->abs_ts;
}
*prev_cap_ts = fdata->abs_ts;
}
+void
+frame_data_cleanup(frame_data *fdata)
+{
+ if (fdata->pfd)
+ g_slist_free(fdata->pfd);
+
+ fdata->pfd = NULL;
+}
+
/* compare two frame_datas */
extern gint frame_data_compare(const frame_data *fdata1, const frame_data *fdata2, int field);
/* compare two frame_datas */
extern gint frame_data_compare(const frame_data *fdata1, const frame_data *fdata2, int field);
+extern void frame_data_cleanup(frame_data *fdata);
+
#endif /* __FRAME_DATA__ */
#endif /* __FRAME_DATA__ */
fragment_set_partial_reassembly
fragment_set_tot_len
fragment_table_init
fragment_set_partial_reassembly
fragment_set_tot_len
fragment_table_init
frame_data_compare
frame_data_init
free_prefs
frame_data_compare
frame_data_init
free_prefs
* "init_dissection()"), and null out the GSList pointer.
*/
fdata->flags.visited = 0;
* "init_dissection()"), and null out the GSList pointer.
*/
fdata->flags.visited = 0;
- if (fdata->pfd) {
- g_slist_free(fdata->pfd);
- fdata->pfd = NULL;
- }
+ frame_data_cleanup(fdata);
}
if (!wtap_seek_read (cf->wth, fdata->file_off, &cf->pseudo_header,
}
if (!wtap_seek_read (cf->wth, fdata->file_off, &cf->pseudo_header,
until it finishes. Should we just stick them with that? */
for (; fdata != NULL; fdata = fdata->next) {
fdata->flags.visited = 0;
until it finishes. Should we just stick them with that? */
for (; fdata != NULL; fdata = fdata->next) {
fdata->flags.visited = 0;
- if (fdata->pfd) {
- g_slist_free(fdata->pfd);
- fdata->pfd = NULL;
- }
+ frame_data_cleanup(fdata);
* data (the per-frame data itself was freed by
* "init_dissection()"), and null out the GSList pointer. */
fdata->flags.visited = 0;
* data (the per-frame data itself was freed by
* "init_dissection()"), and null out the GSList pointer. */
fdata->flags.visited = 0;
- if (fdata->pfd) {
- g_slist_free(fdata->pfd);
- fdata->pfd = NULL;
- }
- /* cleanup_dissection() calls se_free_all();
+ frame_data_cleanup(fdata);
+
+ /* cleanup_dissection() calls se_free_all();
* And after that fdata->col_text (which is allocated using se_alloc0())
* no longer points to valid memory.
*/
* And after that fdata->col_text (which is allocated using se_alloc0())
* no longer points to valid memory.
*/
until it finishes. Should we just stick them with that? */
for (; fdata != NULL; fdata = fdata->next) {
fdata->flags.visited = 0;
until it finishes. Should we just stick them with that? */
for (; fdata != NULL; fdata = fdata->next) {
fdata->flags.visited = 0;
- if (fdata->pfd) {
- g_slist_free(fdata->pfd);
- fdata->pfd = NULL;
- }
+ frame_data_cleanup(fdata);
-/* Free up all data attached to a "frame_data" structure. */
-static void
-clear_fdata(frame_data *fdata)
-{
- if (fdata->pfd)
- g_slist_free(fdata->pfd);
-}
-
static gboolean
process_packet(capture_file *cf, gint64 offset, const struct wtap_pkthdr *whdr,
const guchar *pd)
static gboolean
process_packet(capture_file *cf, gint64 offset, const struct wtap_pkthdr *whdr,
const guchar *pd)
}
epan_dissect_cleanup(&edt);
}
epan_dissect_cleanup(&edt);
+ frame_data_cleanup(&fdata);
-/* Free up all data attached to a "frame_data" structure. */
-static void
-clear_fdata(frame_data *fdata)
-{
- if (fdata->pfd)
- g_slist_free(fdata->pfd);
-}
-
static gboolean
process_packet(capture_file *cf, gint64 offset, const struct wtap_pkthdr *whdr,
union wtap_pseudo_header *pseudo_header, const guchar *pd,
static gboolean
process_packet(capture_file *cf, gint64 offset, const struct wtap_pkthdr *whdr,
union wtap_pseudo_header *pseudo_header, const guchar *pd,
if (do_dissection) {
epan_dissect_cleanup(&edt);
if (do_dissection) {
epan_dissect_cleanup(&edt);
+ frame_data_cleanup(&fdata);