svashisht / rpms / bash

Forked from rpms/bash 4 years ago
Clone

Blame SOURCES/bash-4.2-leak-compound.patch

ff19ae
diff -up bash-4.2/subst.c.old bash-4.2/subst.c
ff19ae
--- bash-4.2/subst.c.old	2015-12-09 13:24:47.369738319 +0100
ff19ae
+++ bash-4.2/subst.c	2015-12-09 13:28:27.366024824 +0100
ff19ae
@@ -2713,6 +2713,8 @@ do_compound_assignment (name, value, fla
ff19ae
       else if (v == 0 || (array_p (v) == 0 && assoc_p (v) == 0) || v->context != variable_context)
ff19ae
         v = make_local_array_variable (name);
ff19ae
       assign_compound_array_list (v, list, flags);
ff19ae
+      if (list)
ff19ae
+	dispose_words (list);
ff19ae
     }
ff19ae
   else
ff19ae
     v = assign_array_from_string (name, value, flags);