Changeset c85b715


Ignore:
Timestamp:
02/08/07 18:41:51 (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:
9bd2edf
Parents:
ec1e19c
Message:

If an error occured opening the file, don't segfault when we cleanup

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/format_pcapfile.c

    rd5a27e8 rc85b715  
    179179static int pcapfile_fin_output(libtrace_out_t *libtrace)
    180180{
    181         libtrace_io_close(DATA(libtrace)->file);
     181        if (DATA(libtrace)->file)
     182                libtrace_io_close(DATA(libtrace)->file);
    182183        free(libtrace->format_data);
    183184        libtrace->format_data=NULL;
Note: See TracChangeset for help on using the changeset viewer.