Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/Makefile
r73 r81 3 3 ################################################################################ 4 4 5 FILES=regfi o.o smb_deps.o void_stack.o5 FILES=regfi.o smb_deps.o void_stack.o 6 6 7 7 all: $(FILES) 8 8 9 regfi o.o: regfio.c10 $(CC) $(CFLAGS) $(OPTS) $(INC) -c -o $@ regfi o.c9 regfi.o: regfi.c 10 $(CC) $(CFLAGS) $(OPTS) $(INC) -c -o $@ regfi.c 11 11 12 12 smb_deps.o: smb_deps.c -
trunk/lib/regfi.c
r80 r81 6 6 * Windows NT registry I/O library 7 7 * 8 * Copyright (C) 2005-200 6Timothy D. Morgan8 * Copyright (C) 2005-2007 Timothy D. Morgan 9 9 * Copyright (C) 2005 Gerald (Jerry) Carter 10 10 * … … 25 25 */ 26 26 27 #include "../include/regfi o.h"27 #include "../include/regfi.h" 28 28 29 29 … … 629 629 nk->hbin->dirty = true; 630 630 631 nk->subkey_index = 0;632 631 return true; 633 632 } … … 1516 1515 { 1517 1516 for(i=0; i < nk->num_values; i++) 1518 regfi_value_free(nk->values[i]); 1517 { 1518 if(nk->values[i].valuename != NULL) 1519 free(nk->values[i].valuename); 1520 if(nk->values[i].data != NULL) 1521 free(nk->values[i].data); 1522 } 1519 1523 free(nk->values); 1520 1524 } … … 1533 1537 /****************************************************************************** 1534 1538 *****************************************************************************/ 1535 void regfi_value_free(REGF_VK_REC* vk)1536 {1537 if(vk->valuename != NULL)1538 free(vk->valuename);1539 if(vk->data != NULL)1540 free(vk->data);1541 1542 /* XXX: not freeing hbin because these are cached. This needs to be reviewed. */1543 free(vk);1544 }1545 1546 1547 /******************************************************************************1548 *****************************************************************************/1549 1539 REGFI_ITERATOR* regfi_iterator_new(REGF_FILE* fh) 1550 1540 { … … 1554 1544 return NULL; 1555 1545 1556 root = regfi_rootkey(f );1546 root = regfi_rootkey(fh); 1557 1547 if(root == NULL) 1558 1548 { … … 1725 1715 /****************************************************************************** 1726 1716 *****************************************************************************/ 1727 REGF_NK_REC* regfi_iterator_cur_key(REGFI_ITERATOR* i) ;1717 REGF_NK_REC* regfi_iterator_cur_key(REGFI_ITERATOR* i) 1728 1718 { 1729 1719 return i->cur_key; … … 1735 1725 REGF_NK_REC* regfi_iterator_first_subkey(REGFI_ITERATOR* i) 1736 1726 { 1737 REGF_NK_REC* subkey;1738 REGF_HBIN* hbin;1739 1740 1727 i->cur_subkey = 0; 1741 1728 return regfi_iterator_cur_subkey(i); … … 1821 1808 && (strcasecmp(cur->valuename, value_name) == 0)) 1822 1809 found = true; 1823 cur = re tfi_iterator_next_value(i);1810 cur = regfi_iterator_next_value(i); 1824 1811 } 1825 1812 … … 1846 1833 REGF_VK_REC* ret_val = NULL; 1847 1834 if(i->cur_value < i->cur_key->num_values) 1848 ret_val = i->cur_key->values[i];1835 ret_val = &(i->cur_key->values[i->cur_value]); 1849 1836 1850 1837 return ret_val; -
trunk/lib/void_stack.c
r80 r81 4 4 * leaks. 5 5 * 6 * Copyright (C) 2005 Timothy D. Morgan6 * Copyright (C) 2005,2007 Timothy D. Morgan 7 7 * 8 8 * This program is free software; you can redistribute it and/or modify
Note: See TracChangeset
for help on using the changeset viewer.