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
+1 -1
View File
@@ -71,7 +71,7 @@ kvsplit (SHELL_VAR *v, char *line, char *dstring)
else
value = "";
return (bind_assoc_variable (v, name_cell (v), savestring (key), savestring (value), 0) != 0);
return (bind_assoc_variable (v, name_cell (v), savestring (key), value, 0) != 0);
}
int
+1
View File
@@ -330,6 +330,7 @@ loadstat (char *vname, SHELL_VAR *var, char *fname, int flags, char *fmt, struct
key = savestring (arraysubs[i]);
value = statval (i, fname, flags, fmt, sp);
v = bind_assoc_variable (var, vname, key, value, ASS_FORCE);
free (value);
}
return 0;
}