Ignore:
Timestamp:
11/22/18 11:59:29 (3 years ago)
Author:
Jacob Van Walraven <jcv9@…>
Branches:
develop
Children:
33b735c
Parents:
2dc1d9b
Message:

Cleanup some of the assertions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/format_dpdkndag.c

    r32ee9b2 r2725318  
    8787                        sizeof(dpdkndag_format_data_t));
    8888
     89        if (!libtrace->format_data) {
     90                trace_set_err(libtrace, TRACE_ERR_INIT_FAILED, "Unable to allocate memory dpdknday_init_input()");
     91                return 1;
     92        }
     93
    8994        FORMAT_DATA->localiface = NULL;
    9095        FORMAT_DATA->threaddatas = NULL;
     
    9398        scan = strchr(libtrace->uridata, ',');
    9499        if (scan == NULL) {
     100                free(libtrace->format_data);
    95101                trace_set_err(libtrace, TRACE_ERR_BAD_FORMAT,
    96102                        "Bad dpdkndag URI. Should be dpdkndag:<interface>,<multicast group>");
     
    109115        if (getaddrinfo(next, NULL, &hints, &result) != 0) {
    110116                perror("getaddrinfo");
     117                free(libtrace->format_data);
    111118                trace_set_err(libtrace, TRACE_ERR_BAD_FORMAT,
    112119                        "Invalid multicast address: %s", next);
Note: See TracChangeset for help on using the changeset viewer.