Changeset 16915 in vbox for trunk/src/VBox/GuestHost/OpenGL
- Timestamp:
- Feb 18, 2009 3:42:19 PM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 43039
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/GuestHost/OpenGL/util/list.c
r16912 r16915 1 1 #include "cr_list.h" 2 2 #include "cr_error.h" 3 #include "cr_mem.h" 4 5 #if CR_TESTING_LIST 3 6 #include <stdio.h> 4 7 #include <stdlib.h> 5 8 #include <string.h> 9 #endif 6 10 7 11 struct CRListIterator { … … 19 23 CRList *crAllocList( void ) 20 24 { 21 CRList *l = malloc( sizeof( CRList ) );25 CRList *l = crAlloc( sizeof( CRList ) ); 22 26 CRASSERT( l ); 23 27 24 l->head = malloc( sizeof( CRListIterator ) );28 l->head = crAlloc( sizeof( CRListIterator ) ); 25 29 CRASSERT( l->head ); 26 30 27 l->tail = malloc( sizeof( CRListIterator ) );31 l->tail = crAlloc( sizeof( CRListIterator ) ); 28 32 CRASSERT( l->tail ); 29 33 … … 52 56 t2->next = NULL; 53 57 t2->element = NULL; 54 free( t2 );58 crFree( t2 ); 55 59 } 56 60 l->size = 0; 57 free( l );61 crFree( l ); 58 62 } 59 63 … … 77 81 CRASSERT( iter != l->head ); 78 82 79 p = malloc( sizeof( CRListIterator ) );83 p = crAlloc( sizeof( CRListIterator ) ); 80 84 CRASSERT( p != NULL ); 81 85 p->prev = iter->prev; … … 102 106 iter->next = NULL; 103 107 iter->element = NULL; 104 free( iter );108 crFree( iter ); 105 109 106 110 l->size--;
Note:
See TracChangeset
for help on using the changeset viewer.