IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jul 31, 2006, 11:44:52 AM (20 years ago)
Author:
jhoblitt
Message:

updated version to fix memory leaks

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/jhoblitt/ippdb/tests/alloc.c

    r7500 r8006  
    880880        detRunRow       *object;
    881881
    882         object = detRunRowAlloc("a string", -32    );
    883 
    884         if (!object) {
    885             exit(EXIT_FAILURE);
    886         }
    887 
     882        object = detRunRowAlloc(-32, "a string"    );
     883
     884        if (!object) {
     885            exit(EXIT_FAILURE);
     886        }
     887
     888        if (!object->iteration == -32) {
     889            psFree(object);
     890            exit(EXIT_FAILURE);
     891        }
    888892        if (strncmp(object->det_type, "a string", MAX_STRING_LENGTH)) {
    889             psFree(object);
    890             exit(EXIT_FAILURE);
    891         }
    892         if (!object->iteration == -32) {
    893893            psFree(object);
    894894            exit(EXIT_FAILURE);
Note: See TracChangeset for help on using the changeset viewer.