aboutsummaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorCem Keylan <cem@ckyln.com>2021-03-09 08:42:47 +0300
committerCem Keylan <cem@ckyln.com>2021-03-09 08:42:47 +0300
commit2106f384939b9627996a77dca7d4310c91f482d7 (patch)
treecf459a74499ea86f2c138b99487a97bb2860a829 /shell
parent09f572b1e859bfb103f654ac86541710d964d9aa (diff)
parent89358a7131d3e75c74af834bb117b4fad7914983 (diff)
downloadbusybox-2106f384939b9627996a77dca7d4310c91f482d7.tar.gz
Merge remote-tracking branch 'upstream/1_33_stable' into 1_33_stable1_33_stable
Diffstat (limited to 'shell')
-rw-r--r--shell/ash.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/shell/ash.c b/shell/ash.c
index f16d7fb6a..ecbfbf091 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -14499,7 +14499,7 @@ int ash_main(int argc UNUSED_PARAM, char **argv)
if (sflag || minusc == NULL) {
#if MAX_HISTORY > 0 && ENABLE_FEATURE_EDITING_SAVEHISTORY
- if (iflag) {
+ if (line_input_state) {
const char *hp = lookupvar("HISTFILE");
if (!hp) {
hp = lookupvar("HOME");
@@ -14513,7 +14513,7 @@ int ash_main(int argc UNUSED_PARAM, char **argv)
}
}
if (hp)
- line_input_state->hist_file = hp;
+ line_input_state->hist_file = xstrdup(hp);
# if ENABLE_FEATURE_SH_HISTFILESIZE
hp = lookupvar("HISTFILESIZE");
line_input_state->max_history = size_from_HISTFILESIZE(hp);