Wireshark-dev: [Wireshark-dev] [PATCH] dependent_frames memleak?
From: Jakub Zawadzki <darkjames-ws@xxxxxxxxxxxx>
Date: Mon, 2 Apr 2012 21:07:40 +0200
Hi,

Looking at r41216 I think dependent_frames list should be always freed,
not only in add_packet_to_packet_list().

Can someone review attached patch? Jeff?
Index: epan/epan.c
===================================================================
--- epan/epan.c	(revision 41867)
+++ epan/epan.c	(working copy)
@@ -209,6 +209,8 @@ epan_dissect_cleanup(epan_dissect_t* edt)
 {
 	g_assert(edt);
 
+	g_slist_free(edt->pi.dependent_frames);
+
 	/* Free the data sources list. */
 	free_data_sources(&edt->pi);
 
Index: file.c
===================================================================
--- file.c	(revision 41867)
+++ file.c	(working copy)
@@ -1136,9 +1136,6 @@ add_packet_to_packet_list(frame_data *fdata, captu
   } else
     fdata->flags.passed_dfilter = 1;
 
-  /* We're done with this list */
-  g_slist_free(edt.pi.dependent_frames);
-
   if(fdata->flags.passed_dfilter || fdata->flags.ref_time)
     cf->displayed_count++;