7 Bug-Reported-by: Wojciech Puchar <wojtek@wojtek.tensor.gdynia.pl>
8 Bug-Reference-ID: <200803131141.m2DBf9vo001136@wojtek.tensor.gdynia.pl>
9 Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2008-03/msg00029.html
13 When reading input lines into a single variable using the `read' builtin,
14 bash did not free the memory it read after assigining it to the named
15 variable, causing a memory leak noticable when reading large amounts of
21 *** ../bash-3.2-patched/builtins/read.def 2007-08-25 13:47:07.000000000 -0400
22 --- bash-3.2/builtins/read.def 2008-03-07 12:55:47.000000000 -0500
26 char *input_string, *orig_input_string, *ifs_chars, *prompt, *arrayname;
27 ! char *e, *t, *t1, *ps2;
32 char *input_string, *orig_input_string, *ifs_chars, *prompt, *arrayname;
33 ! char *e, *t, *t1, *ps2, *tofree;
39 /* Check whether or not the number of fields is exactly the same as the
40 number of variables. */
46 t = get_word_from_string (&input_string, ifs_chars, &e);
47 if (*input_string == 0)
50 input_string = strip_trailing_ifs_whitespace (t1, ifs_chars, saw_escape);
52 t = get_word_from_string (&input_string, ifs_chars, &e);
53 if (*input_string == 0)
54 ! tofree = input_string = t;
56 input_string = strip_trailing_ifs_whitespace (t1, ifs_chars, saw_escape);
60 var = bind_read_variable (list->word->word, input_string);
61 stupidly_hack_special_variables (list->word->word);
65 VUNSETATTR (var, att_invisible);
66 *** ../bash-3.2/patchlevel.h Thu Apr 13 08:31:04 2006
67 --- bash-3.2/patchlevel.h Mon Oct 16 14:22:54 2006
70 looks for to find the patch level (for the sccs version string). */
72 ! #define PATCHLEVEL 37
74 #endif /* _PATCHLEVEL_H_ */
76 looks for to find the patch level (for the sccs version string). */
78 ! #define PATCHLEVEL 38
80 #endif /* _PATCHLEVEL_H_ */