IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 9, 2004, 9:50:32 AM (22 years ago)
Author:
desonia
Message:

took care of any memory leaks in test code.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/collections/psList.c

    r942 r947  
    66 *  @author Robert Daniel DeSonia, MHPCC
    77 *
    8  *  @version $Revision: 1.3 $ $Name: not supported by cvs2svn $
    9  *  @date $Date: 2004-06-09 02:16:41 $
     8 *  @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2004-06-09 19:50:32 $
    1010 *
    1111 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    3333
    3434
    35 
    36 static psListElem *listElemAlloc(void)
    37 {
    38     return(psAlloc(sizeof(psListElem)));
    39 }
    40 
    41 static void listElemFree(psListElem *elem)
    42 {
    43     psFree(elem);
    44 }
    45 
    4635psList *psListAlloc(void *data)
    4736{
     
    7564
    7665        p_psCustomFree(elemFree, psMemDecrRefCounter(ptr->data));
    77         listElemFree(ptr);
     66        psFree(ptr);
    7867
    7968        ptr = next;
     
    9281{
    9382    psListElem* position;
    94     psListElem* elem = listElemAlloc();
     83    psListElem* elem;
    9584    int cursorIndex = 0;
    9685
     
    10291        return list;
    10392    }
     93    elem = psAlloc(sizeof(psListElem));
    10494
    10595    pthread_mutex_lock(&list->lock)
     
    257247     */
    258248    data = elem->data;
    259     listElemFree(elem);
     249    psFree(elem);
    260250    return data;
    261251}
Note: See TracChangeset for help on using the changeset viewer.