[cmor] 125/190: Fixed a bug in py wrapper where some list object where decref where they shouldn't leadi ng to memory leaks, thanks Jamie and al. for this bug fix

Alastair McKinstry mckinstry at moszumanska.debian.org
Tue Jul 21 12:54:46 UTC 2015


This is an automated email from the git hooks/post-receive script.

mckinstry pushed a commit to branch debian/master
in repository cmor.

commit d6cb393caebbbb4729b13caa8fbd4b31de93e496
Author: Charles Doutriaux <doutriaux1 at llnl.gov>
Date:   Fri Dec 14 16:20:25 2012 -0800

    Fixed a bug in py wrapper where some list object where decref where they shouldn't leadi
    ng to memory leaks, thanks Jamie and al. for this bug fix
---
 RELEASE-NOTES     | 2 ++
 Src/_cmormodule.c | 4 ++--
 Src/cmor_axes.c   | 4 ++--
 configure.ac      | 2 +-
 include/cmor.h    | 2 +-
 5 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/RELEASE-NOTES b/RELEASE-NOTES
index 587ad12..e12dae6 100644
--- a/RELEASE-NOTES
+++ b/RELEASE-NOTES
@@ -1,3 +1,5 @@
+2012-12-14 : Tagging 2.8.2
+2012-12-14 : Fixed a bug in py wrapper where some list object where decref where they shouldn't leading to memory leaks, thanks Jamie and al. for this bug fix
 2012-01-30 : Tagging 2.8.1
 2012-01-30 : climatological files now end wirh -clim.nc instead of _clim.nc
 2011-11-08 : Tagging 2.8.0
diff --git a/Src/_cmormodule.c b/Src/_cmormodule.c
index 64efa8f..8281dd4 100644
--- a/Src/_cmormodule.c
+++ b/Src/_cmormodule.c
@@ -538,10 +538,10 @@ static PyObject *
   for(i=0;i<n;i++) {
     tmp  =PyList_GetItem(param_nm_obj,i);
     strcpy(nms[i],PyString_AsString(tmp));
-    Py_DECREF(tmp);
+    //Py_DECREF(tmp); //Not needed get_item does not increase ref
     tmp  =PyList_GetItem(param_un_obj,i);
     strcpy(units[i],PyString_AsString(tmp));
-    Py_DECREF(tmp);
+    //Py_DECREF(tmp); // Not need get_item does not incref
   }
   
   ierr = cmor_set_grid_mapping(gid,name,n,(char **)nms,CMOR_MAX_STRING,param_val,(char **)units,CMOR_MAX_STRING);
diff --git a/Src/cmor_axes.c b/Src/cmor_axes.c
index a578e20..ac0e1e3 100644
--- a/Src/cmor_axes.c
+++ b/Src/cmor_axes.c
@@ -808,8 +808,8 @@ int cmor_treat_axis_values(int axis_id, double *values, int length, int n_reques
   i = cmor_check_monotonic(&values[0],length,name,isbounds,axis_id);
 
 
-  /* now check for valid_min/max things */
-  if (isbounds==0) {
+  /* now check for valid_min/max things except for longitude bounds */
+  if ((isbounds==0) || (treatlon==0)) {
     if (refaxis->valid_min!=1.e20) for (i=0;i<length;i++) if (values[i]<refaxis->valid_min) { 
       if (refaxis->axis=='X') {
 	treatlon = 1;
diff --git a/configure.ac b/configure.ac
index ef45563..ff2759b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2,7 +2,7 @@ dnl                                                -*- Autoconf -*-
 dnl  Process this file with autoconf to produce a configure script.
 
 dnl AC_PREREQ(2.59)
-AC_INIT(cmor, 2.8.1, doutriaux1 at llnl.gov)
+AC_INIT(cmor, 2.8.2, doutriaux1 at llnl.gov)
 
 GIT_TAG=`./get_git_version.sh`
 
diff --git a/include/cmor.h b/include/cmor.h
index 5ac890b..95d8c20 100644
--- a/include/cmor.h
+++ b/include/cmor.h
@@ -3,7 +3,7 @@
 
 #define CMOR_VERSION_MAJOR 2
 #define CMOR_VERSION_MINOR 8
-#define CMOR_VERSION_PATCH 1
+#define CMOR_VERSION_PATCH 2
 
 #define CMOR_CF_VERSION_MAJOR 1
 #define CMOR_CF_VERSION_MINOR 4

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/cmor.git



More information about the debian-science-commits mailing list