Changeset 2cf2c2d


Ignore:
Timestamp:
09/16/11 16:43:59 (9 years ago)
Author:
Shane Alcock <salcock@…>
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:
c0506ea
Parents:
f258932
Message:
  • Don't leak buffers everytime we finish reading from a trace file :(
File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/ior-thread.c

    rf258932 r2cf2c2d  
    177177
    178178        DATA(state)->buffer = (struct buffer_t *)malloc(sizeof(struct buffer_t) * max_buffers);
     179        memset(DATA(state)->buffer, 0, sizeof(struct buffer_t) * max_buffers);
    179180        DATA(state)->in_buffer = 0;
    180181        DATA(state)->offset = 0;
     
    265266        /* Wait for the thread to exit */
    266267        pthread_join(DATA(io)->producer, NULL);
     268        free(DATA(io)->buffer);
    267269        free(DATA(io));
    268270        free(io);
Note: See TracChangeset for help on using the changeset viewer.