- Timestamp:
- 03/20/10 13:50:44 (15 years ago)
- Location:
- trunk/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
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.