Changeset 228 for trunk/src/reglookup.c


Ignore:
Timestamp:
04/18/11 16:25:46 (13 years ago)
Author:
tim
Message:

added a test case for pyregfi multithreaded use
updated the regfi multithreaded test case
fixed several ctypes interface problems in pyregfi
added locking to pyregfi iterators for thread safety
fixed regfi talloc race conditions with an additional lock

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/reglookup.c

    r213 r228  
    9595      fprintf(stderr, "WARN: While quoting value for '%s/%s', "
    9696              "warning returned: %s\n", prefix, quoted_name, conv_error);
    97     regfi_free_record(data);
     97    regfi_free_record(iter->f, data);
    9898  }
    9999
     
    282282    if(!type_filter_enabled || (value->type == type_filter))
    283283      printValue(iter, value, prefix);
    284     regfi_free_record(value);
     284    regfi_free_record(iter->f, value);
    285285    regfi_iterator_next_value(iter);
    286286    printMsgs(iter->f);
     
    310310    sacl = regfi_get_sacl(sk->sec_desc);
    311311    dacl = regfi_get_dacl(sk->sec_desc);
    312     regfi_free_record(sk);
     312    regfi_free_record(iter->f, sk);
    313313
    314314    if(owner == NULL)
     
    345345    else
    346346      quoted_classname = empty_str;
    347     regfi_free_record(classname);
     347    regfi_free_record(iter->f, classname);
    348348
    349349    printMsgs(iter->f);
     
    365365    printf("%s,KEY,,%s\n", full_path, mtime);
    366366
    367   regfi_free_record(key);
     367  regfi_free_record(iter->f, key);
    368368}
    369369
     
    406406      if(cur != root)
    407407      {
    408         regfi_free_record(cur);
     408        regfi_free_record(iter->f, cur);
    409409        /* We're done with this sub-tree, going up and hitting other branches. */
    410410        if(!regfi_iterator_up(iter))
     
    430430       * Let's move down and print this first sub-tree out.
    431431       */
    432       regfi_free_record(cur);
     432      regfi_free_record(iter->f, cur);
    433433      if(!regfi_iterator_down(iter))
    434434      {
     
    438438
    439439      cur = regfi_iterator_cur_key(iter);
    440       regfi_free_record(sub);
     440      regfi_free_record(iter->f, sub);
    441441      regfi_iterator_first_subkey(iter);
    442442      sub = regfi_iterator_cur_subkey(iter);
     
    445445    printMsgs(iter->f);
    446446  } while(!((cur == root) && (sub == NULL)));
    447   regfi_free_record(root);
     447  regfi_free_record(iter->f, root);
    448448
    449449  if(print_verbose)
     
    518518      printValue(iter, value, tmp_path_joined);
    519519
    520     regfi_free_record(value);
     520    regfi_free_record(iter->f, value);
    521521    free(tmp_path);
    522522    free(tmp_path_joined);
Note: See TracChangeset for help on using the changeset viewer.