summaryrefslogtreecommitdiff
path: root/shell.c
diff options
context:
space:
mode:
authorChet Ramey <chet.ramey@case.edu>2011-11-23 19:12:30 -0500
committerChet Ramey <chet.ramey@case.edu>2011-11-23 19:12:30 -0500
commitbcd7f75a2bc2f7c67c9cd6899ff546afa45cbba4 (patch)
tree71f09c9e7e2a9be3c3aa79e31cb48d7069d8a979 /shell.c
parent753c336c548b9a1358058751c6288b6e31458d89 (diff)
downloadreadline-bcd7f75a2bc2f7c67c9cd6899ff546afa45cbba4.tar.gz
Readline-5.0 import
Diffstat (limited to 'shell.c')
-rw-r--r--shell.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/shell.c b/shell.c
index ad27cc1..a07e2b9 100644
--- a/shell.c
+++ b/shell.c
@@ -126,6 +126,7 @@ sh_set_lines_and_columns (lines, cols)
b = (char *)xmalloc (INT_STRLEN_BOUND (int) + sizeof ("LINES=") + 1);
sprintf (b, "LINES=%d", lines);
putenv (b);
+
b = (char *)xmalloc (INT_STRLEN_BOUND (int) + sizeof ("COLUMNS=") + 1);
sprintf (b, "COLUMNS=%d", cols);
putenv (b);
@@ -134,9 +135,12 @@ sh_set_lines_and_columns (lines, cols)
b = (char *)xmalloc (INT_STRLEN_BOUND (int) + 1);
sprintf (b, "%d", lines);
setenv ("LINES", b, 1);
+ free (b);
+
b = (char *)xmalloc (INT_STRLEN_BOUND (int) + 1);
sprintf (b, "%d", cols);
setenv ("COLUMNS", b, 1);
+ free (b);
# endif /* HAVE_SETENV */
#endif /* !HAVE_PUTENV */
}