diff options
-rw-r--r-- | experimental/Networking/SkSockets.h | 4 | ||||
-rw-r--r-- | src/pdf/SkPDFShader.cpp | 4 | ||||
-rw-r--r-- | src/pdf/SkPDFShader.h | 1 | ||||
-rw-r--r-- | third_party/glu/README.skia | 3 | ||||
-rw-r--r-- | third_party/glu/libtess/mesh.c | 7 |
5 files changed, 14 insertions, 5 deletions
diff --git a/experimental/Networking/SkSockets.h b/experimental/Networking/SkSockets.h index 0302426954..a72f67d3a9 100644 --- a/experimental/Networking/SkSockets.h +++ b/experimental/Networking/SkSockets.h @@ -24,7 +24,7 @@ class SkSocket { public: SkSocket(); - ~SkSocket(); + virtual ~SkSocket(); enum State { kError_state, @@ -152,7 +152,7 @@ protected: class SkTCPServer : public SkSocket { public: SkTCPServer(int port = DEFAULT_PORT); - ~SkTCPServer(); + virtual ~SkTCPServer(); /** * Accept any incoming connections to the server, will accept 1 connection diff --git a/src/pdf/SkPDFShader.cpp b/src/pdf/SkPDFShader.cpp index c3c3cd060c..152c693562 100644 --- a/src/pdf/SkPDFShader.cpp +++ b/src/pdf/SkPDFShader.cpp @@ -303,7 +303,7 @@ public: class SkPDFFunctionShader : public SkPDFDict, public SkPDFShader { public: explicit SkPDFFunctionShader(SkPDFShader::State* state); - ~SkPDFFunctionShader() { + virtual ~SkPDFFunctionShader() { if (isValid()) { RemoveShader(this); } @@ -328,7 +328,7 @@ private: class SkPDFImageShader : public SkPDFStream, public SkPDFShader { public: explicit SkPDFImageShader(SkPDFShader::State* state); - ~SkPDFImageShader() { + virtual ~SkPDFImageShader() { RemoveShader(this); fResources.unrefAll(); } diff --git a/src/pdf/SkPDFShader.h b/src/pdf/SkPDFShader.h index afa63e7631..f41bdf038e 100644 --- a/src/pdf/SkPDFShader.h +++ b/src/pdf/SkPDFShader.h @@ -60,6 +60,7 @@ protected: static void RemoveShader(SkPDFObject* shader); SkPDFShader(); + virtual ~SkPDFShader() {}; virtual bool isValid() = 0; }; diff --git a/third_party/glu/README.skia b/third_party/glu/README.skia index a6b10d9240..40aad35031 100644 --- a/third_party/glu/README.skia +++ b/third_party/glu/README.skia @@ -42,3 +42,6 @@ The following changes were made in order to incorporate this code: - In sweep.c, added explicit cast to GLfloat in VertexWeights() to silence compiler complaint + + - In mesh.c in method __gl_meshMakeEdge, added memory cleanup when + MakeEdge failed diff --git a/third_party/glu/libtess/mesh.c b/third_party/glu/libtess/mesh.c index 7305fab1d2..2b84003f39 100644 --- a/third_party/glu/libtess/mesh.c +++ b/third_party/glu/libtess/mesh.c @@ -291,7 +291,12 @@ GLUhalfEdge *__gl_meshMakeEdge( GLUmesh *mesh ) } e = MakeEdge( &mesh->eHead ); - if (e == NULL) return NULL; + if (e == NULL) { + memFree(newVertex1); + memFree(newVertex2); + memFree(newFace); + return NULL; + } MakeVertex( newVertex1, e, &mesh->vHead ); MakeVertex( newVertex2, e->Sym, &mesh->vHead ); |