summaryrefslogtreecommitdiffstats
path: root/abs/core/bash/bash-4.3-old-memleak.patch
blob: ff2b6656a21162a43fe85186a81e9cbb9b33ea0a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
diff -up bash-4.3/subst.c.old bash-4.3/subst.c
--- bash-4.3/subst.c.old	2015-08-03 10:32:37.353490080 +0200
+++ bash-4.3/subst.c	2015-08-03 10:33:34.818533408 +0200
@@ -9492,7 +9492,7 @@ make_internal_declare (word, option)
      char *word;
      char *option;
 {
-  int t;
+  int t, r;
   WORD_LIST *wl;
   WORD_DESC *w;
 
@@ -9504,7 +9504,10 @@ make_internal_declare (word, option)
   wl = make_word_list (w, (WORD_LIST *)NULL);
   wl = make_word_list (make_word (option), wl);
 
-  return (declare_builtin (wl));  
+  r = declare_builtin (wl);  
+
+  dispose_words (wl);
+  return r;
 }  
 #endif