fixed major memory leak in mul::expand()
[ginac.git] / ginac / mul.cpp
index de5d03c03cf3a8d9fd08bb53c0c365a3334248cd..8eef91763736fe0a759a699a8d0d4670c7b99a84 100644 (file)
@@ -647,6 +647,8 @@ ex mul::expand(unsigned options) const
                }
                ++cit;
        }
+       if (expanded_seqp)
+               delete expanded_seqp;
 
        if (is_ex_exactly_of_type(last_expanded,add)) {
                add const & finaladd = ex_to_add(last_expanded);