Skip to content

Commit 72d250d

Browse files
committed
shopt: don't copy option names for get_shopt_options()
This makes the option name handling match get_minus_o_opts() in the `set` builtin and is what the the only usage for get_shopt_options() in pcomplete.c expects as it explicitly doesn't free the list members the same as it does for the set options list.
1 parent 1b4b9d2 commit 72d250d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

builtins/shopt.def

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -777,7 +777,7 @@ get_shopt_options (void)
777777
n = sizeof (shopt_vars) / sizeof (shopt_vars[0]);
778778
ret = strvec_create (n + 1);
779779
for (i = 0; shopt_vars[i].name; i++)
780-
ret[i] = savestring (shopt_vars[i].name);
780+
ret[i] = shopt_vars[i].name;
781781
ret[i] = (char *)NULL;
782782
return ret;
783783
}

0 commit comments

Comments
 (0)