goo/GooString.cc | 3 +++
1 file changed, 3 insertions(+)
New commits:
commit e7dbd17ff07afa465636a90f526cd7ac8c731862
Author: Kenji Uno <[email protected]>
Date: Wed Nov 9 12:39:41 2011 +0100
Fix leak in GooString when resizing
If resizing from "long" to shorter
diff --git a/goo/GooString.cc b/goo/GooString.cc
index a96b792..31c95b1 100644
--- a/goo/GooString.cc
+++ b/goo/GooString.cc
@@ -19,6 +19,7 @@
// Copyright (C) 2006 Krzysztof Kowalczyk <[email protected]>
// Copyright (C) 2007 Jeff Muizelaar <[email protected]>
// Copyright (C) 2008-2011 Albert Astals Cid <[email protected]>
+// Copyright (C) 2011 Kenji Uno <[email protected]>
//
// To see a description of the changes please see the Changelog file that
// came with your tarball or type make ChangeLog if you are building from git
@@ -129,6 +130,8 @@ void inline GooString::resize(int newLength) {
} else {
memcpy(s1, s, length);
}
+ if (s != sStatic)
+ gfree(s);
}
}
_______________________________________________
poppler mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/poppler