hawq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From y...@apache.org
Subject incubator-hawq git commit: HAWQ-108. Allocated memory space for saving preferred host information is not freed
Date Thu, 29 Oct 2015 06:43:10 GMT
Repository: incubator-hawq
Updated Branches:
  refs/heads/master fb215ffb1 -> f2fabc85b


HAWQ-108. Allocated memory space for saving preferred host information is not freed


Project: http://git-wip-us.apache.org/repos/asf/incubator-hawq/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-hawq/commit/f2fabc85
Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/f2fabc85
Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/f2fabc85

Branch: refs/heads/master
Commit: f2fabc85b27c6959a1d569574665482d301e85f0
Parents: fb215ff
Author: Yi Jin <yjin@pivotal.io>
Authored: Thu Oct 29 14:42:53 2015 +0800
Committer: Yi Jin <yjin@pivotal.io>
Committed: Thu Oct 29 14:42:53 2015 +0800

----------------------------------------------------------------------
 .../resourcebroker/resourcebroker_LIBYARN_proc.c        | 12 ++++++++++++
 1 file changed, 12 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/f2fabc85/src/backend/resourcemanager/resourcebroker/resourcebroker_LIBYARN_proc.c
----------------------------------------------------------------------
diff --git a/src/backend/resourcemanager/resourcebroker/resourcebroker_LIBYARN_proc.c b/src/backend/resourcemanager/resourcebroker/resourcebroker_LIBYARN_proc.c
index d4a5748..1a44503 100644
--- a/src/backend/resourcemanager/resourcebroker/resourcebroker_LIBYARN_proc.c
+++ b/src/backend/resourcemanager/resourcebroker/resourcebroker_LIBYARN_proc.c
@@ -808,6 +808,14 @@ int handleRM2RB_AllocateResource(void)
 
 	if ( YARNJobID == NULL )
 	{
+    	if (pBuffer != NULL)
+    	{
+    		rm_pfree(PCONTEXT, pBuffer);
+    	}
+    	if (preferredArray != NULL)
+    	{
+    		rm_pfree(PCONTEXT, preferredArray);
+    	}
 		return sendRBAllocateResourceErrorData(RESBROK_ERROR_GRM, &request);
 	}
 
@@ -830,9 +838,13 @@ int handleRM2RB_AllocateResource(void)
     if ( libyarnres != FUNCTION_SUCCEEDED )
     {
     	if (pBuffer != NULL)
+    	{
     		rm_pfree(PCONTEXT, pBuffer);
+    	}
     	if (preferredArray != NULL)
+    	{
     		rm_pfree(PCONTEXT, preferredArray);
+    	}
     	return sendRBAllocateResourceErrorData(RESBROK_ERROR_GRM, &request);
     }
 


Mime
View raw message