Changeset 223
- Timestamp:
- 04/03/11 12:21:04 (14 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/regfi.c
r219 r223 1368 1368 } 1369 1369 } 1370 talloc_ steal(nk, nk->values);1370 talloc_reparent(NULL, nk, nk->values); 1371 1371 } 1372 1372 } … … 1398 1398 nk->num_subkeys = 0; 1399 1399 } 1400 talloc_ steal(nk, nk->subkeys);1400 talloc_reparent(NULL, nk, nk->subkeys); 1401 1401 } 1402 1402 } … … 1528 1528 1529 1529 /* In this case, we want file_cb to be freed when ret_val is */ 1530 talloc_ steal(ret_val, file_cb);1530 talloc_reparent(NULL, ret_val, file_cb); 1531 1531 return ret_val; 1532 1532 … … 1539 1539 /****************************************************************************** 1540 1540 ******************************************************************************/ 1541 int regfi_free_cb(void* f)1541 static int regfi_free_cb(void* f) 1542 1542 { 1543 1543 REGFI_FILE* file = (REGFI_FILE*)f; … … 1616 1616 goto fail; 1617 1617 } 1618 talloc_ steal(rb, rb->hbins);1618 talloc_reparent(NULL, rb, rb->hbins); 1619 1619 1620 1620 rla = true; … … 1625 1625 rla = range_list_add(rb->hbins, hbin->file_off, hbin->block_size, hbin); 1626 1626 if(rla) 1627 talloc_ steal(rb->hbins, hbin);1627 talloc_reparent(NULL, rb->hbins, hbin); 1628 1628 1629 1629 hbin_off = hbin->file_off + hbin->block_size; … … 1794 1794 return NULL; 1795 1795 } 1796 talloc_ steal(ret_val, ret_val->key_positions);1796 talloc_reparent(NULL, ret_val, ret_val->key_positions); 1797 1797 1798 1798 ret_val->f = file; … … 1928 1928 const REGFI_NK* regfi_iterator_cur_key(REGFI_ITERATOR* i) 1929 1929 { 1930 talloc_reference(NULL, i->cur_key); 1931 return i->cur_key; 1930 return talloc_reference(NULL, i->cur_key); 1932 1931 } 1933 1932 … … 2056 2055 ret_val->raw = raw; 2057 2056 ret_val->size = parse_length; 2058 talloc_ steal(ret_val, raw);2057 talloc_reparent(NULL, ret_val, raw); 2059 2058 2060 2059 interpreted = talloc_array(NULL, char, parse_length); … … 2074 2073 else 2075 2074 { 2075 /* XXX: check for NULL return here? */ 2076 2076 interpreted = talloc_realloc(NULL, interpreted, char, conv_size); 2077 2077 ret_val->interpreted = interpreted; 2078 talloc_ steal(ret_val, interpreted);2078 talloc_reparent(NULL, ret_val, interpreted); 2079 2079 } 2080 2080 … … 2267 2267 return NULL; 2268 2268 2269 talloc_ steal(ret_val, raw_data.buf);2269 talloc_reparent(NULL, ret_val, raw_data.buf); 2270 2270 ret_val->raw = raw_data.buf; 2271 2271 ret_val->size = raw_data.len; … … 2319 2319 } 2320 2320 2321 /* XXX: check for NULL */ 2321 2322 tmp_str = talloc_realloc(NULL, tmp_str, uint8_t, tmp_size); 2322 2323 data->interpreted.string = tmp_str; 2323 2324 data->interpreted_size = tmp_size; 2324 talloc_ steal(data, tmp_str);2325 talloc_reparent(NULL, data, tmp_str); 2325 2326 break; 2326 2327 … … 2407 2408 /* XXX: how meaningful is this? should we store number of strings instead? */ 2408 2409 data->interpreted_size = tmp_size; 2409 talloc_ steal(tmp_array, tmp_str);2410 talloc_ steal(data, tmp_array);2410 talloc_reparent(NULL, tmp_array, tmp_str); 2411 talloc_reparent(NULL, data, tmp_array); 2411 2412 break; 2412 2413 -
trunk/src/reglookup-recover.c
r206 r223 573 573 */ 574 574 vk->data = regfi_buffer_to_data(data); 575 talloc_ steal(vk, vk->data);575 talloc_reparent(NULL, vk, vk->data); 576 576 } 577 577 } … … 612 612 goto fail; 613 613 } 614 talloc_ steal(unalloc_keys, key);614 talloc_reparent(NULL, unalloc_keys, key); 615 615 j+=key->cell_size-8; 616 616 } … … 753 753 return 20; 754 754 } 755 talloc_ steal(unalloc_sks, sk);755 talloc_reparent(NULL, unalloc_sks, sk); 756 756 j+=sk->cell_size-8; 757 757 }
Note: See TracChangeset
for help on using the changeset viewer.