Changeset 136 for trunk/src/reglookup.c
- Timestamp:
- 01/23/09 12:29:51 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/reglookup.c
r135 r136 255 255 if((new_buf = realloc(buf, buf_len)) == NULL) 256 256 { 257 free(name); 257 258 free(buf); 258 259 free(iter); … … 372 373 const REGFI_NK_REC* sub = NULL; 373 374 char* path = NULL; 375 char* msgs = NULL; 374 376 int key_type = regfi_type_str2val("KEY"); 375 377 bool print_this = true; … … 377 379 root = cur = regfi_iterator_cur_key(iter); 378 380 sub = regfi_iterator_first_subkey(iter); 379 381 msgs = regfi_get_messages(iter->f); 382 if(msgs != NULL) 383 fprintf(stderr, "%s", msgs); 380 384 if(root == NULL) 381 385 bailOut(EX_DATAERR, "ERROR: root cannot be NULL.\n"); … … 455 459 /* Strip any potential value name at end of path */ 456 460 for(i=0; 457 (path[i] != NULL) && (path[i+1] != NULL) 458 && (i < REGFI_MAX_DEPTH+1+1); 461 (path[i] != NULL) && (path[i+1] != NULL) && (i < REGFI_MAX_DEPTH+1); 459 462 i++) 460 tmp_path[i] = path[i]; 461 463 { tmp_path[i] = path[i]; } 462 464 tmp_path[i] = NULL; 463 465 … … 471 473 if(print_verbose) 472 474 fprintf(stderr, "VERBOSE: Found final path element as root key.\n"); 475 free(tmp_path); 473 476 return 2; 474 477 }
Note: See TracChangeset
for help on using the changeset viewer.