From 2297a57476e1b92d87e95cd79d3a4f9aca532d8b Mon Sep 17 00:00:00 2001 From: vincentcasseau Date: Fri, 18 Oct 2024 11:19:58 +0200 Subject: [PATCH 1/2] Post: fix to bug introduced in pull request 201 --- Cassiopee/Post/Post/computeDiv2.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cassiopee/Post/Post/computeDiv2.cpp b/Cassiopee/Post/Post/computeDiv2.cpp index a99044813..ed1b832d4 100644 --- a/Cassiopee/Post/Post/computeDiv2.cpp +++ b/Cassiopee/Post/Post/computeDiv2.cpp @@ -838,7 +838,7 @@ PyObject* K_POST::computeDiv2Struct3D( E_Float ffx, ffy, ffz; for (E_Int n = 0; n < nfld; n++) { - E_Float* gpdv = gp.begin(n); + E_Float* gpdv = gp.begin(n+1); E_Float* fpx = faceField.begin(3*n+1); E_Float* fpy = faceField.begin(3*n+2); E_Float* fpz = faceField.begin(3*n+3); From c2becfe05b7c4a1dc7b3ccee08618f4688b1c1e2 Mon Sep 17 00:00:00 2001 From: vincentcasseau Date: Fri, 18 Oct 2024 11:48:30 +0200 Subject: [PATCH 2/2] Converter: fix mem leak in pngwrite --- Cassiopee/Converter/Converter/IO/GenIO_binpng.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Cassiopee/Converter/Converter/IO/GenIO_binpng.cpp b/Cassiopee/Converter/Converter/IO/GenIO_binpng.cpp index 35e639d52..8c7dc3944 100644 --- a/Cassiopee/Converter/Converter/IO/GenIO_binpng.cpp +++ b/Cassiopee/Converter/Converter/IO/GenIO_binpng.cpp @@ -363,6 +363,7 @@ E_Int K_IO::GenIO::pngwrite( if (setjmp(png_jmpbuf(png_ptr))) {delete[] row_pointers; return 1;} png_write_end(png_ptr, NULL); + png_destroy_write_struct(&png_ptr, &info_ptr); /* cleanup allocations */ delete [] row_pointers;