Branch: Tag:

2016-10-21

2016-10-21 10:17:59 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [cpp]: Fixed some memory leaks.

1056:   #ifdef PIKE_DEBUG    if (!use_initial_predefs) Pike_fatal ("Initial predefs has been taken over.\n");   #endif -  for (def = first_predef; def; def = def->next) -  mapping_string_insert_string(map, -  make_shared_string(def->name), -  make_shared_string(def->value)); +  for (def = first_predef; def; def = def->next) { +  struct pike_string *name = make_shared_string(def->name); +  struct pike_string *value = make_shared_string(def->value); +  mapping_string_insert_string(map, name, value); +  free_string(value); +  free_string(name); +  }    return map;   }