* variable.c: Clean up some memory leaks.

This commit is contained in:
Paul Smith 2016-03-23 01:26:04 -04:00
parent e97159745d
commit 35047f824a

View file

@ -362,6 +362,7 @@ undefine_variable_in_set (const char *name, unsigned int length,
{
hash_delete_at (&set->table, var_slot);
free_variable_name_and_value (v);
free (v);
if (set == &global_variable_set)
++variable_changenum;
}
@ -1069,7 +1070,7 @@ target_environment (struct file *file)
}
}
makelevel_key.name = xstrdup (MAKELEVEL_NAME);
makelevel_key.name = (char *)MAKELEVEL_NAME;
makelevel_key.length = MAKELEVEL_LENGTH;
hash_delete (&table, &makelevel_key);