fixed bug where the ptr** was freed prior to the ptr*
authorerickson <erickson@9efc2488-bf62-4759-914b-345cdb29e865>
Mon, 27 Feb 2006 00:44:31 +0000 (00:44 +0000)
committererickson <erickson@9efc2488-bf62-4759-914b-345cdb29e865>
Mon, 27 Feb 2006 00:44:31 +0000 (00:44 +0000)
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@645 9efc2488-bf62-4759-914b-345cdb29e865

src/libstack/osrf_list.c

index cc591db..2a60317 100644 (file)
@@ -52,13 +52,9 @@ void osrfListFree( osrfList* list ) {
        int retcode;
 
        while (value != NULL) {
-               JLD(retcode, list->list, index);
-
-               if(list->freeItem) {
+               if(list->freeItem) 
                        list->freeItem( (void*) *value );
-                       *value = (Word_t) NULL;
-               }
-
+               JLD(retcode, list->list, index);
                JLP(value, list->list, index);
        }