[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [32091] trunk/blender/source/blender: fix for python refcounting leak, RNA_path_resolve_full now unsets the index if its not last.

Campbell Barton ideasman42 at gmail.com
Fri Sep 24 05:24:17 CEST 2010


Revision: 32091
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=32091
Author:   campbellbarton
Date:     2010-09-24 05:24:15 +0200 (Fri, 24 Sep 2010)

Log Message:
-----------
fix for python refcounting leak, RNA_path_resolve_full now unsets the index if its not last.

Modified Paths:
--------------
    trunk/blender/source/blender/makesrna/intern/rna_access.c
    trunk/blender/source/blender/python/intern/bpy_rna.c

Modified: trunk/blender/source/blender/makesrna/intern/rna_access.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_access.c	2010-09-24 00:39:01 UTC (rev 32090)
+++ trunk/blender/source/blender/makesrna/intern/rna_access.c	2010-09-24 03:24:15 UTC (rev 32091)
@@ -3027,6 +3027,7 @@
 			if(nextptr.data) {
 				curptr= nextptr;
 				prop= NULL; /* now we have a PointerRNA, the prop is our parent so forget it */
+				*index= -1;
 			}
 			else
 				return 0;
@@ -3069,6 +3070,7 @@
 				if(nextptr.data) {
 					curptr= nextptr;
 					prop= NULL;  /* now we have a PointerRNA, the prop is our parent so forget it */
+					*index= -1;
 				}
 				else
 					return 0;

Modified: trunk/blender/source/blender/python/intern/bpy_rna.c
===================================================================
--- trunk/blender/source/blender/python/intern/bpy_rna.c	2010-09-24 00:39:01 UTC (rev 32090)
+++ trunk/blender/source/blender/python/intern/bpy_rna.c	2010-09-24 03:24:15 UTC (rev 32091)
@@ -1140,6 +1140,8 @@
 					Py_XDECREF(value_new); return -1;
 				}
 			}
+			
+			Py_XDECREF(value_new);
 
 			break;
 		}





More information about the Bf-blender-cvs mailing list