Changes in / [6514097:2bce91d]
- Location:
- lib
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
lib/format_linux_common.c
r509ee47 r630460b 70 70 pcap_t *pcap; 71 71 72 /* Take a copy of the filter object as it was passed in */ 73 f = (libtrace_filter_t *) malloc(sizeof(libtrace_filter_t)); 74 memcpy(f, filter, sizeof(libtrace_filter_t)); 72 /* Take a copy of the filter structure to prevent against 73 * deletion causing the filter to no longer work */ 74 f = (libtrace_filter_t *) malloc(sizeof(libtrace_filter_t)); 75 memcpy(f, filter, sizeof(libtrace_filter_t)); 76 f->filterstring = strdup(filter->filterstring); 75 77 76 78 /* If we are passed a filter with "flag" set to zero, then we must … … 120 122 121 123 if (FORMAT_DATA->filter != NULL) 122 free(FORMAT_DATA->filter);124 trace_destroy_filter(FORMAT_DATA->filter); 123 125 124 126 FORMAT_DATA->filter = f; … … 498 500 if (libtrace->format_data) { 499 501 if (FORMAT_DATA->filter != NULL) 500 free(FORMAT_DATA->filter);502 trace_destroy_filter(FORMAT_DATA->filter); 501 503 502 504 if (FORMAT_DATA->per_stream) -
lib/format_linux_ring.c
rd439067 r8df87c4 308 308 } 309 309 310 311 free(FORMAT_DATA->filter);310 if (FORMAT_DATA->filter != NULL) 311 trace_destroy_filter(FORMAT_DATA->filter); 312 312 313 313 if (FORMAT_DATA->per_stream)
Note: See TracChangeset
for help on using the changeset viewer.