Changeset f0d19d4


Ignore:
Timestamp:
02/22/06 18:02:59 (16 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:
c2d5f23
Parents:
c1db742
Message:

Make valgrind happier by free'ing memory that we should have been!

Location:
lib
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • lib/fifo.c

    r3d4d52d rf0d19d4  
    8080        assert(size > 0);
    8181
    82         if (tracefifo_stat_buffer == 0)
    83                 tracefifo_stat_buffer = (char *)malloc(513);
    8482        fifo->length = size;
    8583
     
    179177        char *scan = 0;
    180178        assert(fifo);
     179
     180        if (tracefifo_stat_buffer == 0)
     181                tracefifo_stat_buffer = (char *)malloc(513);
    181182
    182183        bzero(tracefifo_stat_buffer,513);
  • lib/format_erf.c

    rc1db742 rf0d19d4  
    303303
    304304static int rtclient_fin_input(struct libtrace_t *libtrace) {
     305        free(CONNINFO.rt.hostname);
    305306        close(INPUT.fd);
     307        free(libtrace->format_data);
    306308        return 0;
    307309}
  • lib/format_pcap.c

    rc1db742 rf0d19d4  
    237237        pcap_dump_flush(OUTPUT.trace.dump);
    238238        pcap_dump_close(OUTPUT.trace.dump);
     239        pcap_close(OUTPUT.trace.pcap);
     240        free(libtrace->format_data);
    239241        return 0;
    240242}
  • lib/format_wag.c

    rc1db742 rf0d19d4  
    203203static int wag_fin_input(struct libtrace_t *libtrace) {
    204204        close(INPUT.fd);
     205        free(libtrace->format_data);
    205206        return 0;
    206207}
     
    208209static int wtf_fin_input(struct libtrace_t *libtrace) {
    209210        LIBTRACE_CLOSE(INPUT.file);
     211        free(libtrace->format_data);
    210212        return 0;
    211213}
     
    213215static int wtf_fin_output(struct libtrace_out_t *libtrace) {
    214216        LIBTRACE_CLOSE(OUTPUT.file);
     217        free(libtrace->format_data);
    215218        return 0;
    216219}
Note: See TracChangeset for help on using the changeset viewer.