Changeset 5fe998b
- Timestamp:
- 01/08/19 10:09:47 (2 years ago)
- Branches:
- develop
- Children:
- 4ac48fa
- Parents:
- 2bce91d
- Location:
- lib
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
lib/format_linux_common.c
r630460b r5fe998b 73 73 * deletion causing the filter to no longer work */ 74 74 f = (libtrace_filter_t *) malloc(sizeof(libtrace_filter_t)); 75 memset(f, 0, sizeof(libtrace_filter_t)); 75 76 memcpy(f, filter, sizeof(libtrace_filter_t)); 76 77 f->filterstring = strdup(filter->filterstring); -
lib/trace.c
rd439067 r5fe998b 1554 1554 #else 1555 1555 struct libtrace_filter_t *filter = (struct libtrace_filter_t *) 1556 malloc(sizeof(struct libtrace_filter_t));1556 calloc(1, sizeof(struct libtrace_filter_t)); 1557 1557 filter->filter.bf_insns = (struct bpf_insn *) 1558 1558 malloc(sizeof(struct bpf_insn) * bf_len); … … 1578 1578 #ifdef HAVE_BPF 1579 1579 libtrace_filter_t *filter = (libtrace_filter_t*) 1580 malloc(sizeof(libtrace_filter_t));1580 calloc(1, sizeof(libtrace_filter_t)); 1581 1581 filter->filterstring = strdup(filterstring); 1582 1582 filter->jitfilter = NULL;
Note: See TracChangeset
for help on using the changeset viewer.