Пример #1
0
void cleanup_config(void)
{
    ldestroy_cb(part_list, (void(*)(void*))avr_free_part);
    ldestroy_cb(programmers, (void(*)(void*))pgm_free);
    ldestroy_cb(string_list, (void(*)(void*))free_token);
    ldestroy_cb(number_list, (void(*)(void*))free_token);
}
Пример #2
0
void pgm_free(PROGRAMMER * const p)
{
  ldestroy_cb(p->id,free);
  p->id = NULL;
  /* this is done by pgm_teardown, but usually cookie is not set to NULL */
  /* if (p->cookie !=NULL) {
    free(p->cookie);
    p->cookie = NULL;
  }*/
  free(p);
}