fix for -c command ending with backslash; fix several small memory leaks; fix several uninitialized variables; compgen -V fix

This commit is contained in:
Chet Ramey
2023-06-26 16:23:10 -04:00
parent 293916f885
commit 81f7b44564
16 changed files with 133 additions and 18 deletions
+5 -1
View File
@@ -206,7 +206,10 @@ bind_assoc_var_internal (SHELL_VAR *entry, HASH_TABLE *hash, char *key, const ch
newval = make_array_variable_value (entry, 0, key, value, flags);
if (entry->assign_func)
(*entry->assign_func) (entry, newval, 0, key);
{
(*entry->assign_func) (entry, newval, 0, key);
FREE (key);
}
else
assoc_insert (hash, key, newval);
@@ -958,6 +961,7 @@ quote_compound_array_word (char *w, int type)
if (t != w+ind)
free (t);
strcpy (nword + i, value);
free (value);
return nword;
}