Fixed memory leak.
authorJán Kupec <jkupec@suse.cz>
Fri, 20 Mar 2009 13:29:33 +0000 (14:29 +0100)
committerJán Kupec <jkupec@suse.cz>
Fri, 20 Mar 2009 13:29:33 +0000 (14:29 +0100)
src/utils/Augeas.cc

index 1966c04..d1d7578 100644 (file)
@@ -166,6 +166,8 @@ TriBool Augeas::isCommented(
       result = false;
     DBG << result << endl;
   }
+  for (int i = 0; i < matchcount; ++i)
+    ::free(matches[i]);
   if (matchcount)
     ::free(matches);