Changeset 83 for trunk


Ignore:
Timestamp:
01/17/07 14:11:19 (17 years ago)
Author:
tim
Message:

fixed minor memory leak.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/reglookup.c

    r82 r83  
    382382
    383383
     384/* XXX: Each chunk must be unquoted after it is split out.
     385 *      Quoting syntax may need to be standardized and pushed into the API
     386 *      to deal with this issue and others.
     387 */
    384388char** splitPath(const char* s)
    385389{
     
    430434
    431435  return ret_val;
     436}
     437
     438
     439void freePath(char** path)
     440{
     441  uint32 i;
     442
     443  if(path == NULL)
     444    return;
     445
     446  for(i=0; path[i] != NULL; i++)
     447    free(path[i]);
     448
     449  free(path);
    432450}
    433451
     
    914932  {
    915933    retr_path_ret = retrievePath(iter, path);
     934    freePath(path);
     935
    916936    if(retr_path_ret == 0)
    917937      fprintf(stderr, "WARNING: specified path not found.\n");
Note: See TracChangeset for help on using the changeset viewer.