- Timestamp:
- 03/15/10 12:50:36 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/regfi.c
r180 r181 1289 1289 } 1290 1290 } 1291 talloc_ reference(nk, nk->values);1291 talloc_steal(nk, nk->values); 1292 1292 } 1293 1293 } … … 1319 1319 nk->num_subkeys = 0; 1320 1320 } 1321 talloc_ reference(nk, nk->subkeys);1321 talloc_steal(nk, nk->subkeys); 1322 1322 } 1323 1323 } … … 1442 1442 1443 1443 /* In this case, we want file_cb to be freed when ret_val is */ 1444 talloc_ reference(ret_val, file_cb);1444 talloc_steal(ret_val, file_cb); 1445 1445 return ret_val; 1446 1446 … … 1495 1495 if(rb->hbins == NULL) 1496 1496 goto fail; 1497 talloc_ reference(rb, rb->hbins);1497 talloc_steal(rb, rb->hbins); 1498 1498 1499 1499 rla = true; … … 1504 1504 rla = range_list_add(rb->hbins, hbin->file_off, hbin->block_size, hbin); 1505 1505 if(rla) 1506 talloc_ reference(rb->hbins, hbin);1506 talloc_steal(rb->hbins, hbin); 1507 1507 1508 1508 hbin_off = hbin->file_off + hbin->block_size; … … 1655 1655 return NULL; 1656 1656 } 1657 ret_val->cur_key = root; 1658 talloc_steal(ret_val, root); 1657 1659 1658 1660 ret_val->key_positions = void_stack_new(REGFI_MAX_DEPTH); … … 1662 1664 return NULL; 1663 1665 } 1664 talloc_ reference(ret_val, ret_val->key_positions);1666 talloc_steal(ret_val, ret_val->key_positions); 1665 1667 1666 1668 ret_val->f = file; 1667 ret_val->cur_key = root;1668 1669 ret_val->cur_subkey = 0; 1669 1670 ret_val->cur_value = 0; … … 1710 1711 return false; 1711 1712 } 1712 talloc_ reference(i, subkey);1713 talloc_steal(i, subkey); 1713 1714 1714 1715 i->cur_key = subkey; … … 1995 1996 ret_val->raw = raw; 1996 1997 ret_val->size = parse_length; 1997 talloc_ reference(ret_val, raw);1998 talloc_steal(ret_val, raw); 1998 1999 1999 2000 interpreted = talloc_array(NULL, char, parse_length); … … 2015 2016 interpreted = talloc_realloc(NULL, interpreted, char, conv_size); 2016 2017 ret_val->interpreted = interpreted; 2017 talloc_ reference(ret_val, interpreted);2018 talloc_steal(ret_val, interpreted); 2018 2019 } 2019 2020 … … 2095 2096 return NULL; 2096 2097 2097 talloc_ reference(ret_val, raw_data.buf);2098 talloc_steal(ret_val, raw_data.buf); 2098 2099 ret_val->raw = raw_data.buf; 2099 2100 ret_val->size = raw_data.len; … … 2150 2151 data->interpreted.string = tmp_str; 2151 2152 data->interpreted_size = tmp_size; 2152 talloc_ reference(data, tmp_str);2153 talloc_steal(data, tmp_str); 2153 2154 break; 2154 2155 … … 2235 2236 /* XXX: how meaningful is this? should we store number of strings instead? */ 2236 2237 data->interpreted_size = tmp_size; 2237 talloc_ reference(tmp_array, tmp_str);2238 talloc_ reference(data, tmp_array);2238 talloc_steal(tmp_array, tmp_str); 2239 talloc_steal(data, tmp_array); 2239 2240 break; 2240 2241 … … 2419 2420 REGFI_HBIN* regfi_parse_hbin(REGFI_FILE* file, uint32_t offset, bool strict) 2420 2421 { 2421 REGFI_HBIN *hbin;2422 REGFI_HBIN* hbin = NULL; 2422 2423 uint8_t hbin_header[REGFI_HBIN_HEADER_SIZE]; 2423 2424 uint32_t length;
Note: See TracChangeset
for help on using the changeset viewer.