Changeset 181 for trunk/src


Ignore:
Timestamp:
03/15/10 12:50:36 (15 years ago)
Author:
tim
Message:

fixed memory management issues and a talloc_free() of an uninitialized pointer

Location:
trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/reglookup-recover.c

    r178 r181  
    3535bool print_leftover = false;
    3636bool print_parsedraw = false;
    37 char* registry_file = NULL;
     37const char* registry_file = NULL;
    3838
    3939#include "common.c"
     
    818818    }
    819819  }
    820   /*test_offset = strtol(argv[argi++], NULL, 16);*/
    821 
    822   if((registry_file = strdup(argv[argi])) == NULL)
    823     bailOut(REGLOOKUP_EXIT_OSERR, "ERROR: Memory allocation problem.\n");
     820  registry_file = argv[argi];
    824821
    825822  fd = openHive(registry_file);
  • trunk/src/reglookup.c

    r178 r181  
    4040char* path_filter = NULL;
    4141int type_filter;
    42 char* registry_file = NULL;
     42const char* registry_file = NULL;
    4343
    4444/* Other globals */
     
    617617    }
    618618  }
    619   if((registry_file = strdup(argv[argi])) == NULL)
    620     bailOut(REGLOOKUP_EXIT_OSERR, "ERROR: Memory allocation problem.\n");
     619  registry_file = argv[argi];
    621620
    622621  fd = openHive(registry_file);
Note: See TracChangeset for help on using the changeset viewer.