7
Bug-Reported-by: "David Parks" <davidparks21@yahoo.com>
8
Bug-Reference-ID: <014101cc82c6$46ac1540$d4043fc0$@com>
9
Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2011-10/msg00031.html
13
Overwriting a value in an associative array causes the memory allocated to
14
store the key on the second and subsequent assignments to leak.
16
Patch (apply with `patch -p0'):
21
b = hash_search (key, hash, HASH_CREATE);
24
+ /* If we are overwriting an existing element's value, we're not going to
25
+ use the key. Nothing in the array assignment code path frees the key
26
+ string, so we can free it here to avoid a memory leak. */
30
b->data = value ? savestring (value) : (char *)0;
32
--- a/bash/patchlevel.h
33
+++ b/bash/patchlevel.h
35
regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh
36
looks for to find the patch level (for the sccs version string). */
38
-#define PATCHLEVEL 10
39
+#define PATCHLEVEL 11
41
#endif /* _PATCHLEVEL_H_ */