Ignore:
Timestamp:
09/18/06 23:11:15 (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:
d694056
Parents:
eecda9f
Message:

Deal with OOM to keep splint happier

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/format_pcapfile.c

    r0bd9361 r279486e  
    7070static int pcapfile_init_input(libtrace_t *libtrace) {
    7171        libtrace->format_data = malloc(sizeof(struct pcapfile_format_data_t));
     72
     73        if (libtrace->format_data == NULL) {
     74                trace_set_err(libtrace,ENOMEM,"Out of memory");
     75                return -1;
     76        }
    7277
    7378        DATA(libtrace)->file=NULL;
Note: See TracChangeset for help on using the changeset viewer.