diff options
| author | Kristian Evers <kristianevers@gmail.com> | 2020-12-13 15:30:47 +0100 |
|---|---|---|
| committer | Kristian Evers <kristianevers@gmail.com> | 2020-12-13 15:30:47 +0100 |
| commit | c3efbd23a5bf26f1dfd5bc55ae3488d5665ace98 (patch) | |
| tree | a204df79f7057d7d420bf7c5358791347617b9cd /src/initcache.cpp | |
| parent | 126445148d3b742c7f4e31f5f65857be59c48340 (diff) | |
| parent | 6857d1a4a8eb6fcb7b88b0339413913ba2c3351a (diff) | |
| download | PROJ-c3efbd23a5bf26f1dfd5bc55ae3488d5665ace98.tar.gz PROJ-c3efbd23a5bf26f1dfd5bc55ae3488d5665ace98.zip | |
Merge remote-tracking branch 'osgeo/master'
Diffstat (limited to 'src/initcache.cpp')
| -rw-r--r-- | src/initcache.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/initcache.cpp b/src/initcache.cpp index af20fb82..cf9460ab 100644 --- a/src/initcache.cpp +++ b/src/initcache.cpp @@ -48,7 +48,7 @@ paralist *pj_clone_paralist( const paralist *list) for( ; list != nullptr; list = list->next ) { paralist *newitem = (paralist *) - pj_malloc(sizeof(paralist) + strlen(list->param)); + malloc(sizeof(paralist) + strlen(list->param)); newitem->used = 0; newitem->next = nullptr; @@ -83,17 +83,17 @@ void pj_clear_initcache() { paralist *n, *t = cache_paralist[i]; - pj_dalloc( cache_key[i] ); + free( cache_key[i] ); /* free parameter list elements */ for (; t != nullptr; t = n) { n = t->next; - pj_dalloc(t); + free(t); } } - pj_dalloc( cache_key ); - pj_dalloc( cache_paralist ); + free( cache_key ); + free( cache_paralist ); cache_count = 0; cache_alloc= 0; cache_key = nullptr; @@ -151,29 +151,29 @@ void pj_insert_initcache( const char *filekey, const paralist *list ) cache_alloc = cache_alloc * 2 + 15; - cache_key_new = (char **) pj_malloc(sizeof(char*) * cache_alloc); + cache_key_new = (char **) malloc(sizeof(char*) * cache_alloc); if( cache_key && cache_count ) { memcpy( cache_key_new, cache_key, sizeof(char*) * cache_count); } - pj_dalloc( cache_key ); + free( cache_key ); cache_key = cache_key_new; cache_paralist_new = (paralist **) - pj_malloc(sizeof(paralist*) * cache_alloc); + malloc(sizeof(paralist*) * cache_alloc); if( cache_paralist && cache_count ) { memcpy( cache_paralist_new, cache_paralist, sizeof(paralist*) * cache_count ); } - pj_dalloc( cache_paralist ); + free( cache_paralist ); cache_paralist = cache_paralist_new; } /* ** Duplicate the filekey and paralist, and insert in cache. */ - cache_key[cache_count] = (char *) pj_malloc(strlen(filekey)+1); + cache_key[cache_count] = (char *) malloc(strlen(filekey)+1); strcpy( cache_key[cache_count], filekey ); cache_paralist[cache_count] = pj_clone_paralist( list ); |
