Changeset 747c501 for lib/format_wag.c


Ignore:
Timestamp:
04/27/06 00:48:42 (15 years ago)
Author:
Perry Lorier <perry@…>
Branches:
4.0.1-hotfixes, cachetimestamps, develop, dpdk-ndag, etsilive, getfragoff, help, libtrace4, master, ndag_format, pfring, rc-4.0.1, rc-4.0.2, rc-4.0.3, rc-4.0.4, ringdecrementfix, ringperformance, ringtimestampfixes
Children:
e641bdc
Parents:
d97bbb2
Message:

Fix some memory leaks
Add new destroy for bpf filters
Properly initialise memory for wag

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/format_wag.c

    r4315572b r747c501  
    116116static int wtf_init_input(struct libtrace_t *libtrace)
    117117{
    118         libtrace->format_data = malloc(sizeof(struct wag_format_data_t));
     118        libtrace->format_data = calloc(1,sizeof(struct wag_format_data_t));
    119119        return 0;
    120120}
     
    133133
    134134static int wtf_init_output(struct libtrace_out_t *libtrace) {
    135         libtrace->format_data = calloc(1,sizeof(struct wag_format_data_out_t));
     135        libtrace->format_data = malloc(sizeof(struct wag_format_data_out_t));
    136136
    137137        OUTPUT.file = 0;
Note: See TracChangeset for help on using the changeset viewer.