Possibly uninitialized SkRgnBuilder fStorage.

fStorage needs to be initialized regardless of SkRgnBuilder::init()'s
outcome - otherwise the destructor can end up freeing garbage.

BUG=330293
R=reed@google.com, fmalita@google.com

Author: fmalita@chromium.org

Review URL: https://codereview.chromium.org/122313002

git-svn-id: http://skia.googlecode.com/svn/trunk@12846 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
commit-bot@chromium.org 2013-12-30 16:21:06 +00:00
parent 85e143c33c
commit 73be1fc2b0

View File

@ -15,6 +15,7 @@
class SkRgnBuilder : public SkBlitter {
public:
SkRgnBuilder();
virtual ~SkRgnBuilder();
// returns true if it could allocate the working storage needed
@ -98,6 +99,10 @@ private:
}
};
SkRgnBuilder::SkRgnBuilder()
: fStorage(NULL) {
}
SkRgnBuilder::~SkRgnBuilder() {
sk_free(fStorage);
}