- Timestamp:
- 05/08/11 13:33:49 (14 years ago)
- Location:
- trunk/lib
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/lru_cache.c
r250 r252 260 260 ht->table[hash] = e; 261 261 } 262 if(ht->talloc_data) 263 data = talloc_reference(e, data); 262 264 e->data = data; 263 if(ht->talloc_data)264 talloc_reference(e, e->data);265 265 266 266 /* Finally, let's insert the element to the newest position in the LRU list.*/ -
trunk/lib/regfi.c
r251 r252 1799 1799 /****************************************************************************** 1800 1800 *****************************************************************************/ 1801 bool regfi_reference_record(REGFI_FILE* file, const void* record) 1802 { 1803 bool ret_val = false; 1801 const void* regfi_reference_record(REGFI_FILE* file, const void* record) 1802 { 1803 const void* ret_val = NULL; 1804 1804 1805 if(!regfi_lock(file, &file->mem_lock, "regfi_reference_record")) 1805 1806 return ret_val; 1806 1807 if(talloc_reference(NULL, record) != NULL) 1808 ret_val = true; 1807 1808 ret_val = talloc_reference(NULL, record); 1809 1809 1810 1810 regfi_unlock(file, &file->mem_lock, "regfi_reference_record"); … … 1933 1933 if(subkey == NULL) 1934 1934 { 1935 regfi_log_add(REGFI_LOG_WARN, "Could not obtain cur_subkey during"1936 " iterator_down with subkey index (%d) and key offset=%.8X\n",1937 i->cur->cur_subkey, i->cur->offset);1938 1935 talloc_free(pos); 1939 1936 return false; … … 2026 2023 /****************************************************************************** 2027 2024 *****************************************************************************/ 2028 bool regfi_iterator_ walk_path(REGFI_ITERATOR* i, const char** path)2025 bool regfi_iterator_descend(REGFI_ITERATOR* i, const char** path) 2029 2026 { 2030 2027 uint32_t x; … … 2175 2172 /****************************************************************************** 2176 2173 *****************************************************************************/ 2177 const REGFI_NK** regfi_iterator_ cur_path(REGFI_ITERATOR* i)2174 const REGFI_NK** regfi_iterator_ancestry(REGFI_ITERATOR* i) 2178 2175 { 2179 2176 REGFI_NK** ret_val; … … 2203 2200 void_stack_iterator_free(iter); 2204 2201 2205 if(!regfi_lock(i->f, &i->f->mem_lock, "regfi_ cur_path"))2202 if(!regfi_lock(i->f, &i->f->mem_lock, "regfi_iterator_ancestry")) 2206 2203 { 2207 2204 talloc_free(ret_val); … … 2212 2209 talloc_reparent(NULL, ret_val, ret_val[k]); 2213 2210 2214 regfi_unlock(i->f, &i->f->mem_lock, "regfi_ cur_path");2211 regfi_unlock(i->f, &i->f->mem_lock, "regfi_iterator_ancestry"); 2215 2212 2216 2213 ret_val[k] = NULL;
Note: See TracChangeset
for help on using the changeset viewer.