- Timestamp:
- 03/20/10 13:50:44 (15 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/regfi.h
r182 r184 78 78 #include "lru_cache.h" 79 79 80 81 /******************************************************************************/ 82 /* Constants for use while interacting with the library */ 80 83 /******************************************************************************/ 81 84 … … 84 87 #define REGFI_LOG_WARN 0x0004 85 88 #define REGFI_LOG_ERROR 0x0010 86 87 /* For internal use */88 pthread_key_t REGFI_LOG_KEY;89 89 90 90 typedef uint8_t REGFI_ENCODING; … … 119 119 120 120 121 122 /******************************************************************************/ 123 /* Various resource limits and related constants */ 124 /******************************************************************************/ 125 126 /* Flags determining whether or not to cache various record types internally */ 127 #define REGFI_CACHE_SK 0 128 121 129 /* This maximum depth is described here: 122 130 * http://msdn.microsoft.com/en-us/library/ms724872%28VS.85%29.aspx … … 132 140 #define REGFI_MAX_SUBKEY_DEPTH 255 133 141 142 143 /******************************************************************************/ 144 /* Symbols for internal use */ 145 /******************************************************************************/ 146 147 /* Global thread-local storage key */ 148 pthread_key_t REGFI_LOG_KEY; 134 149 135 150 /* Header sizes and magic number lengths for various records */ … … 236 251 #define TIME_FIXUP_CONSTANT (369.0*365.25*24*60*60-(3.0*24*60*60+6.0*60*60)) 237 252 253 254 255 /******************************************************************************/ 256 /* Structures */ 257 /******************************************************************************/ 258 238 259 typedef struct _regfi_nttime 239 260 { … … 825 846 * 826 847 * @return A reference to a newly allocated REGFI_FILE structure, if successful; 827 * NULL on error. 848 * NULL on error. Use regfi_free to free the returned REGFI_FILE. 828 849 * 829 850 * @ingroup regfiBase … … 840 861 * 841 862 * @return A reference to a newly allocated REGFI_FILE structure, if successful; 842 * NULL on error. 863 * NULL on error. Use regfi_free to free the returned REGFI_FILE. 843 864 * 844 865 * @ingroup regfiBase … … 909 930 /* Dispose of previously parsed records */ 910 931 911 /** Frees a key structure previously returned by one of the API functions 912 * 913 * XXX: finish documenting 932 /** Frees a record previously returned by one of the API functions. 933 * 934 * Can be used to free REGFI_NK_REC, REGFI_VK_REC, REGFI_SK_REC, REGFI_DATA, and 935 * REGFI_CLASSNAME records. 936 * 937 * @note The "const" in the data type is a bit misleading and is there just for 938 * convenience. Since records returned previously must not be modified by users 939 * of the API due to internal caching, these are returned as const, so this 940 * function is const to make passing back in easy. 914 941 * 915 942 * @ingroup regfiBase 916 943 */ 917 void regfi_free_key(REGFI_NK_REC* nk); 918 919 920 /** Frees a value structure previously returned by one of the API functions 921 * 922 * XXX: finish documenting 923 * 924 * @ingroup regfiBase 925 */ 926 void regfi_free_value(REGFI_VK_REC* vk); 927 944 void regfi_free_record(const void* record); 928 945 929 946 … … 1038 1055 * @ingroup regfiIteratorLayer 1039 1056 */ 1040 const REGFI_NK_REC* 1057 const REGFI_NK_REC* regfi_iterator_cur_key(REGFI_ITERATOR* i); 1041 1058 1042 1059 … … 1049 1066 * @ingroup regfiIteratorLayer 1050 1067 */ 1051 const REGFI_SK_REC* 1068 const REGFI_SK_REC* regfi_iterator_cur_sk(REGFI_ITERATOR* i); 1052 1069 1053 1070 … … 1060 1077 * subkey, or NULL on failure. Failure may be due to a lack of any 1061 1078 * subkeys or other errors. Newly allocated keys must be freed with 1062 * regfi_free_ key.1063 * 1064 * @ingroup regfiIteratorLayer 1065 */ 1066 REGFI_NK_REC*regfi_iterator_first_subkey(REGFI_ITERATOR* i);1079 * regfi_free_record. 1080 * 1081 * @ingroup regfiIteratorLayer 1082 */ 1083 const REGFI_NK_REC* regfi_iterator_first_subkey(REGFI_ITERATOR* i); 1067 1084 1068 1085 … … 1073 1090 * @return A newly allocated key structure for the currently referenced subkey, 1074 1091 * or NULL on failure. Newly allocated keys must be freed with 1075 * regfi_free_ key.1076 * 1077 * @ingroup regfiIteratorLayer 1078 */ 1079 REGFI_NK_REC*regfi_iterator_cur_subkey(REGFI_ITERATOR* i);1092 * regfi_free_record. 1093 * 1094 * @ingroup regfiIteratorLayer 1095 */ 1096 const REGFI_NK_REC* regfi_iterator_cur_subkey(REGFI_ITERATOR* i); 1080 1097 1081 1098 … … 1086 1103 * 1087 1104 * @return A newly allocated key structure for the next subkey or NULL on 1088 * failure. Newly allocated keys must be freed with regfi_free_ key.1089 * 1090 * @ingroup regfiIteratorLayer 1091 */ 1092 REGFI_NK_REC*regfi_iterator_next_subkey(REGFI_ITERATOR* i);1105 * failure. Newly allocated keys must be freed with regfi_free_record. 1106 * 1107 * @ingroup regfiIteratorLayer 1108 */ 1109 const REGFI_NK_REC* regfi_iterator_next_subkey(REGFI_ITERATOR* i); 1093 1110 1094 1111 … … 1104 1121 * @ingroup regfiIteratorLayer 1105 1122 */ 1106 bool regfi_iterator_find_subkey(REGFI_ITERATOR* i,1107 const char* subkey_name); 1123 bool regfi_iterator_find_subkey(REGFI_ITERATOR* i, const char* subkey_name); 1124 1108 1125 1109 1126 /** Sets the internal value index to the first value referenced by the current … … 1115 1132 * value, or NULL on failure. Failure may be due to a lack of any 1116 1133 * values or other errors. Newly allocated keys must be freed with 1117 * regfi_free_ value.1118 * 1119 * @ingroup regfiIteratorLayer 1120 */ 1121 REGFI_VK_REC*regfi_iterator_first_value(REGFI_ITERATOR* i);1134 * regfi_free_record. 1135 * 1136 * @ingroup regfiIteratorLayer 1137 */ 1138 const REGFI_VK_REC* regfi_iterator_first_value(REGFI_ITERATOR* i); 1122 1139 1123 1140 … … 1128 1145 * @return A newly allocated value structure for the currently referenced value, 1129 1146 * or NULL on failure. Newly allocated values must be freed with 1130 * regfi_free_ value.1131 * 1132 * @ingroup regfiIteratorLayer 1133 */ 1134 REGFI_VK_REC*regfi_iterator_cur_value(REGFI_ITERATOR* i);1147 * regfi_free_record. 1148 * 1149 * @ingroup regfiIteratorLayer 1150 */ 1151 const REGFI_VK_REC* regfi_iterator_cur_value(REGFI_ITERATOR* i); 1135 1152 1136 1153 … … 1141 1158 * 1142 1159 * @return A newly allocated key structure for the next value or NULL on 1143 * failure. Newly allocated keys must be freed with regfi_free_ value.1144 * 1145 * @ingroup regfiIteratorLayer 1146 */ 1147 REGFI_VK_REC*regfi_iterator_next_value(REGFI_ITERATOR* i);1160 * failure. Newly allocated keys must be freed with regfi_free_record. 1161 * 1162 * @ingroup regfiIteratorLayer 1163 */ 1164 const REGFI_VK_REC* regfi_iterator_next_value(REGFI_ITERATOR* i); 1148 1165 1149 1166 … … 1168 1185 * 1169 1186 * @return Returns a newly allocated classname structure, or NULL on failure. 1170 * Classname structures must be freed with regfi_free_ classname.1171 * 1172 * @ingroup regfiIteratorLayer 1173 */ 1174 REGFI_CLASSNAME*regfi_iterator_fetch_classname(REGFI_ITERATOR* i,1175 const REGFI_NK_REC* key);1187 * Classname structures must be freed with regfi_free_record. 1188 * 1189 * @ingroup regfiIteratorLayer 1190 */ 1191 const REGFI_CLASSNAME* regfi_iterator_fetch_classname(REGFI_ITERATOR* i, 1192 const REGFI_NK_REC* key); 1176 1193 1177 1194 … … 1182 1199 * 1183 1200 * @return Returns a newly allocated data structure, or NULL on failure. 1184 * Data structures must be freed with regfi_free_ data.1185 * 1186 * @ingroup regfiIteratorLayer 1187 */ 1188 REGFI_DATA* regfi_iterator_fetch_data(REGFI_ITERATOR* i, 1189 1201 * Data structures must be freed with regfi_free_record. 1202 * 1203 * @ingroup regfiIteratorLayer 1204 */ 1205 const REGFI_DATA* regfi_iterator_fetch_data(REGFI_ITERATOR* i, 1206 const REGFI_VK_REC* value); 1190 1207 1191 1208 … … 1276 1293 uint32_t type, REGFI_DATA* data); 1277 1294 1278 1279 /** Frees the memory associated with a REGFI_CLASSNAME data structure.1280 *1281 * XXX: finish documenting1282 *1283 * @ingroup regfiGlueLayer1284 */1285 void regfi_free_classname(REGFI_CLASSNAME* classname);1286 1287 1288 /** Frees the memory associated with a REGFI_DATA data structure.1289 *1290 * XXX: finish documenting1291 *1292 * @ingroup regfiGlueLayer1293 */1294 void regfi_free_data(REGFI_DATA* data);1295 1295 1296 1296 … … 1434 1434 REGFI_NK_REC* regfi_rootkey(REGFI_FILE* file, 1435 1435 REGFI_ENCODING output_encoding); 1436 void regfi_subkeylist_free(REGFI_SUBKEY_LIST* list);1437 1436 1438 1437 off_t regfi_raw_seek(REGFI_RAW_FILE* self, -
trunk/lib/lru_cache.c
r169 r184 119 119 if(max_keys == 0) 120 120 ret_val->num_buckets = 1024; 121 else if(max_keys == 1) 122 ret_val->num_buckets = 1; 121 123 else 122 124 { … … 125 127 ret_val->num_buckets = 1; 126 128 } 127 129 128 130 ret_val->table = talloc_array(ret_val, 129 131 lru_cache_element*, ret_val->num_buckets); … … 177 179 */ 178 180 if(ht->talloc_data) 179 talloc_ free(e->data);181 talloc_unlink(e, e->data); 180 182 181 183 if(e->newer == NULL) … … 224 226 225 227 if(ht->talloc_data) 226 talloc_ free(e->data);228 talloc_unlink(e, e->data); 227 229 228 230 tmp_index = talloc_realloc_size(e, e->index, index_len); … … 261 263 e->data = data; 262 264 if(ht->talloc_data) 263 talloc_ steal(e, e->data);265 talloc_reference(e, e->data); 264 266 265 267 /* Finally, let's insert the element to the newest position in the LRU list.*/ -
trunk/lib/regfi.c
r182 r184 947 947 948 948 for(i=0; i < num_lists; i++) 949 regfi_subkeylist_free(lists[i]);949 talloc_free(lists[i]); 950 950 free(lists); 951 951 … … 1185 1185 if(vk->valuename == NULL) 1186 1186 { 1187 regfi_free_value(vk);1187 talloc_free(vk); 1188 1188 return; 1189 1189 } … … 1279 1279 if(nk->keyname == NULL) 1280 1280 { 1281 regfi_free_key(nk);1281 talloc_free(nk); 1282 1282 return; 1283 1283 } … … 1333 1333 if(strict) 1334 1334 { 1335 regfi_free_key(nk);1335 talloc_free(nk); 1336 1336 return NULL; 1337 1337 } … … 1350 1350 if(strict) 1351 1351 { 1352 regfi_free_key(nk);1352 talloc_free(nk); 1353 1353 return NULL; 1354 1354 } … … 1367 1367 if(strict) 1368 1368 { 1369 regfi_free_key(nk);1369 talloc_free(nk); 1370 1370 return NULL; 1371 1371 } … … 1400 1400 void* failure_ptr = NULL; 1401 1401 1402 max_size = regfi_calc_maxsize(file, offset); 1403 if(max_size < 0) 1404 return NULL; 1405 1406 if(file->sk_cache == NULL) 1407 return regfi_parse_sk(file, offset, max_size, strict); 1408 1402 1409 if(!regfi_lock(file, file->sk_lock, "regfi_load_sk")) 1403 1410 return NULL; … … 1412 1419 if(ret_val == NULL) 1413 1420 { 1414 max_size = regfi_calc_maxsize(file, offset);1415 if(max_size < 0)1416 return NULL;1417 1418 1421 ret_val = regfi_parse_sk(file, offset, max_size, strict); 1419 1422 if(ret_val == NULL) … … 1424 1427 *(uint32_t*)failure_ptr = REGFI_OFFSET_NONE; 1425 1428 lru_cache_update(file->sk_cache, &offset, 4, failure_ptr); 1429 1430 /* Let the cache be the only owner of this */ 1431 talloc_unlink(NULL, failure_ptr); 1426 1432 return NULL; 1427 1433 } 1428 1429 lru_cache_update(file->sk_cache, &offset, 4, ret_val);1430 1434 } 1431 1435 1432 1436 if(!regfi_unlock(file, file->sk_lock, "regfi_load_sk")) 1433 return NULL; 1437 { 1438 talloc_unlink(NULL, ret_val); 1439 return NULL; 1440 } 1434 1441 1435 1442 return ret_val; … … 1597 1604 cache_secret = 0x15DEAD05^time(NULL)^(getpid()<<16); 1598 1605 1599 /* Cache an unlimited number of SK records. Typically there are very few. */ 1600 rb->sk_cache = lru_cache_create_ctx(rb, 0, cache_secret, true); 1606 if(REGFI_CACHE_SK) 1607 rb->sk_cache = lru_cache_create_ctx(rb, 64, cache_secret, true); 1608 else 1609 rb->sk_cache = NULL; 1601 1610 1602 1611 /* success */ … … 1678 1687 /****************************************************************************** 1679 1688 *****************************************************************************/ 1680 void regfi_free_key(REGFI_NK_REC* nk) 1681 { 1682 regfi_subkeylist_free(nk->subkeys); 1683 talloc_free(nk); 1684 } 1685 1686 1687 /****************************************************************************** 1688 *****************************************************************************/ 1689 void regfi_free_value(REGFI_VK_REC* vk) 1690 { 1691 talloc_free(vk); 1692 } 1693 1694 1695 /****************************************************************************** 1696 *****************************************************************************/ 1697 void regfi_subkeylist_free(REGFI_SUBKEY_LIST* list) 1698 { 1699 if(list != NULL) 1700 { 1701 talloc_free(list); 1702 } 1703 } 1689 void regfi_free_record(const void* record) 1690 { 1691 talloc_unlink(NULL, (void*)record); 1692 } 1693 1704 1694 1705 1695 … … 1731 1721 } 1732 1722 ret_val->cur_key = root; 1733 talloc_ steal(ret_val, root);1723 talloc_reference(ret_val, root); 1734 1724 1735 1725 ret_val->key_positions = void_stack_new(REGFI_MAX_DEPTH); … … 1783 1773 { 1784 1774 talloc_free(pos); 1785 regfi_free_key(subkey);1775 talloc_unlink(NULL, subkey); 1786 1776 return false; 1787 1777 } 1788 talloc_ steal(i, subkey);1778 talloc_reference(i, subkey); 1789 1779 1790 1780 i->cur_key = subkey; … … 1806 1796 return false; 1807 1797 1808 regfi_free_key(i->cur_key);1798 talloc_unlink(i, i->cur_key); 1809 1799 i->cur_key = pos->nk; 1810 1800 i->cur_subkey = pos->cur_subkey; … … 1847 1837 else 1848 1838 { 1849 regfi_free_key(subkey);1839 talloc_unlink(NULL, subkey); 1850 1840 subkey = (REGFI_NK_REC*)regfi_iterator_next_subkey(i); 1851 1841 } … … 1858 1848 } 1859 1849 1860 regfi_free_key(subkey);1850 talloc_unlink(NULL, subkey); 1861 1851 return true; 1862 1852 } … … 1909 1899 /****************************************************************************** 1910 1900 *****************************************************************************/ 1911 REGFI_NK_REC* regfi_iterator_first_subkey(REGFI_ITERATOR* i)1901 const REGFI_NK_REC* regfi_iterator_first_subkey(REGFI_ITERATOR* i) 1912 1902 { 1913 1903 i->cur_subkey = 0; … … 1918 1908 /****************************************************************************** 1919 1909 *****************************************************************************/ 1920 REGFI_NK_REC* regfi_iterator_cur_subkey(REGFI_ITERATOR* i)1910 const REGFI_NK_REC* regfi_iterator_cur_subkey(REGFI_ITERATOR* i) 1921 1911 { 1922 1912 uint32_t nk_offset; … … 1929 1919 nk_offset = i->cur_key->subkeys->elements[i->cur_subkey].offset; 1930 1920 1931 return regfi_load_key(i->f, nk_offset+REGFI_REGF_SIZE, i->string_encoding,1932 true);1921 return regfi_load_key(i->f, nk_offset+REGFI_REGF_SIZE, 1922 i->string_encoding, true); 1933 1923 } 1934 1924 … … 1937 1927 *****************************************************************************/ 1938 1928 /* XXX: some way of indicating reason for failure should be added. */ 1939 REGFI_NK_REC* regfi_iterator_next_subkey(REGFI_ITERATOR* i)1940 { 1941 REGFI_NK_REC* subkey;1929 const REGFI_NK_REC* regfi_iterator_next_subkey(REGFI_ITERATOR* i) 1930 { 1931 const REGFI_NK_REC* subkey; 1942 1932 1943 1933 i->cur_subkey++; … … 1955 1945 bool regfi_iterator_find_value(REGFI_ITERATOR* i, const char* value_name) 1956 1946 { 1957 REGFI_VK_REC* cur;1947 const REGFI_VK_REC* cur; 1958 1948 bool found = false; 1959 1949 uint32_t old_value = i->cur_value; … … 1973 1963 else 1974 1964 { 1975 regfi_free_ value(cur);1965 regfi_free_record(cur); 1976 1966 cur = regfi_iterator_next_value(i); 1977 1967 } … … 1984 1974 } 1985 1975 1986 regfi_free_ value(cur);1976 regfi_free_record(cur); 1987 1977 return true; 1988 1978 } … … 1991 1981 /****************************************************************************** 1992 1982 *****************************************************************************/ 1993 REGFI_VK_REC* regfi_iterator_first_value(REGFI_ITERATOR* i)1983 const REGFI_VK_REC* regfi_iterator_first_value(REGFI_ITERATOR* i) 1994 1984 { 1995 1985 i->cur_value = 0; … … 2000 1990 /****************************************************************************** 2001 1991 *****************************************************************************/ 2002 REGFI_VK_REC* regfi_iterator_cur_value(REGFI_ITERATOR* i)1992 const REGFI_VK_REC* regfi_iterator_cur_value(REGFI_ITERATOR* i) 2003 1993 { 2004 1994 REGFI_VK_REC* ret_val = NULL; … … 2021 2011 /****************************************************************************** 2022 2012 *****************************************************************************/ 2023 REGFI_VK_REC* regfi_iterator_next_value(REGFI_ITERATOR* i)2024 { 2025 REGFI_VK_REC* ret_val;2013 const REGFI_VK_REC* regfi_iterator_next_value(REGFI_ITERATOR* i) 2014 { 2015 const REGFI_VK_REC* ret_val; 2026 2016 2027 2017 i->cur_value++; … … 2036 2026 /****************************************************************************** 2037 2027 *****************************************************************************/ 2038 REGFI_CLASSNAME* regfi_iterator_fetch_classname(REGFI_ITERATOR* i, 2039 const REGFI_NK_REC* key)2028 const REGFI_CLASSNAME* regfi_iterator_fetch_classname(REGFI_ITERATOR* i, 2029 const REGFI_NK_REC* key) 2040 2030 { 2041 2031 REGFI_CLASSNAME* ret_val; … … 2100 2090 /****************************************************************************** 2101 2091 *****************************************************************************/ 2102 REGFI_DATA* regfi_iterator_fetch_data(REGFI_ITERATOR* i,2103 2092 const REGFI_DATA* regfi_iterator_fetch_data(REGFI_ITERATOR* i, 2093 const REGFI_VK_REC* value) 2104 2094 { 2105 2095 REGFI_DATA* ret_val = NULL; … … 2140 2130 2141 2131 return ret_val; 2142 }2143 2144 2145 /******************************************************************************2146 *****************************************************************************/2147 void regfi_free_classname(REGFI_CLASSNAME* classname)2148 {2149 talloc_free(classname);2150 }2151 2152 /******************************************************************************2153 *****************************************************************************/2154 void regfi_free_data(REGFI_DATA* data)2155 {2156 talloc_free(data);2157 2132 } 2158 2133 -
trunk/src/common.c
r182 r184 163 163 * value, and a non-NULL (*error_msg). 164 164 */ 165 static char* data_to_ascii( REGFI_DATA* data, char** error_msg)165 static char* data_to_ascii(const REGFI_DATA* data, char** error_msg) 166 166 { 167 167 char* ret_val; -
trunk/src/reglookup-recover.c
r182 r184 291 291 { 292 292 /* XXX: Need to add a warning here */ 293 regfi_free_ key(cur_ancestor);293 regfi_free_record(cur_ancestor); 294 294 void_stack_free(path_stack); 295 295 return NULL; … … 303 303 ret_val_size += path_element->len + 1; 304 304 305 regfi_free_ key(cur_ancestor);305 regfi_free_record(cur_ancestor); 306 306 } 307 307 } … … 631 631 632 632 fail: 633 regfi_free_ key(key);633 regfi_free_record(key); 634 634 return error_code; 635 635 } -
trunk/src/reglookup.c
r182 r184 54 54 void printValue(REGFI_ITERATOR* iter, const REGFI_VK_REC* vk, char* prefix) 55 55 { 56 REGFI_DATA* data;56 const REGFI_DATA* data; 57 57 char* quoted_value = NULL; 58 58 char* quoted_name = NULL; … … 95 95 fprintf(stderr, "WARN: While quoting value for '%s/%s', " 96 96 "warning returned: %s\n", prefix, quoted_name, conv_error); 97 regfi_free_ data(data);97 regfi_free_record(data); 98 98 } 99 99 … … 275 275 void printValueList(REGFI_ITERATOR* iter, char* prefix) 276 276 { 277 REGFI_VK_REC* value;277 const REGFI_VK_REC* value; 278 278 279 279 value = regfi_iterator_first_value(iter); … … 282 282 if(!type_filter_enabled || (value->type == type_filter)) 283 283 printValue(iter, value, prefix); 284 regfi_free_ value(value);284 regfi_free_record(value); 285 285 value = regfi_iterator_next_value(iter); 286 286 printMsgs(iter->f); … … 299 299 char* quoted_classname; 300 300 const REGFI_SK_REC* sk; 301 const REGFI_NK_REC* k = regfi_iterator_cur_key(iter);302 REGFI_CLASSNAME* classname;303 304 formatTime(&k ->mtime, mtime);301 const REGFI_NK_REC* key = regfi_iterator_cur_key(iter); 302 const REGFI_CLASSNAME* classname; 303 304 formatTime(&key->mtime, mtime); 305 305 306 306 if(print_security && (sk=regfi_iterator_cur_sk(iter))) … … 310 310 sacl = regfi_get_sacl(sk->sec_desc); 311 311 dacl = regfi_get_dacl(sk->sec_desc); 312 regfi_free_record(sk); 313 312 314 if(owner == NULL) 313 315 owner = empty_str; … … 319 321 dacl = empty_str; 320 322 321 classname = regfi_iterator_fetch_classname(iter, k );323 classname = regfi_iterator_fetch_classname(iter, key); 322 324 printMsgs(iter->f); 323 325 if(classname != NULL) … … 343 345 else 344 346 quoted_classname = empty_str; 345 regfi_free_ classname(classname);347 regfi_free_record(classname); 346 348 347 349 printMsgs(iter->f); … … 362 364 else 363 365 printf("%s,KEY,,%s\n", full_path, mtime); 366 367 regfi_free_record(key); 364 368 } 365 369 … … 369 373 const REGFI_NK_REC* root = NULL; 370 374 const REGFI_NK_REC* cur = NULL; 371 REGFI_NK_REC* sub = NULL;375 const REGFI_NK_REC* sub = NULL; 372 376 char* path = NULL; 373 377 int key_type = regfi_type_str2val("KEY"); … … 430 434 431 435 cur = regfi_iterator_cur_key(iter); 432 regfi_free_ key(sub);436 regfi_free_record(sub); 433 437 sub = regfi_iterator_first_subkey(iter); 434 438 print_this = true; … … 453 457 int retrievePath(REGFI_ITERATOR* iter, char** path) 454 458 { 455 REGFI_VK_REC* value;459 const REGFI_VK_REC* value; 456 460 char* tmp_path_joined; 457 461 const char** tmp_path; … … 508 512 printValue(iter, value, tmp_path_joined); 509 513 510 regfi_free_ value(value);514 regfi_free_record(value); 511 515 free(tmp_path); 512 516 free(tmp_path_joined);
Note: See TracChangeset
for help on using the changeset viewer.