[asterisk-commits] eliel: branch group/data_api_gsoc2009 r210232 - /team/group/data_api_gsoc2009...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Aug 4 06:58:40 CDT 2009


Author: eliel
Date: Tue Aug  4 06:58:36 2009
New Revision: 210232

URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=210232
Log:
We are always creating the container inside the node, so we
always need to free it.
This will fix the leak in the result tree.


Modified:
    team/group/data_api_gsoc2009/main/data.c

Modified: team/group/data_api_gsoc2009/main/data.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/group/data_api_gsoc2009/main/data.c?view=diff&rev=210232&r1=210231&r2=210232
==============================================================================
--- team/group/data_api_gsoc2009/main/data.c (original)
+++ team/group/data_api_gsoc2009/main/data.c Tue Aug  4 06:58:36 2009
@@ -1286,15 +1286,13 @@
 	case AST_DATA_POINTER:
 	case AST_DATA_STRING:
 		ast_free(root->payload.ptr);
-		break;
 	case AST_DATA_CONTAINER:
-		ao2_ref(root->children, -1);
-		break;
 	case AST_DATA_INTEGER:
 	case AST_DATA_UNSIGNED_INTEGER:
 	case AST_DATA_DOUBLE:
 	case AST_DATA_BOOLEAN:
 	case AST_DATA_IPADDR:
+		ao2_ref(root->children, -1);
 		break;
 	}
 }




More information about the asterisk-commits mailing list