You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hawq.apache.org by zt...@apache.org on 2022/05/18 09:10:30 UTC

[hawq] branch master updated: HAWQ-1840. fix memory leak in hdfs/hive protocol external table

This is an automated email from the ASF dual-hosted git repository.

ztao1987 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hawq.git


The following commit(s) were added to refs/heads/master by this push:
     new 3bca85c1d HAWQ-1840. fix memory leak in hdfs/hive protocol external table
3bca85c1d is described below

commit 3bca85c1d25ee505df63b6f4bf882b7a563b04d6
Author: ztao1987 <zh...@gmail.com>
AuthorDate: Wed May 18 17:09:27 2022 +0800

    HAWQ-1840. fix memory leak in hdfs/hive protocol external table
---
 contrib/exthdfs/exthdfs.c | 2 +-
 contrib/exthive/exthive.c | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/contrib/exthdfs/exthdfs.c b/contrib/exthdfs/exthdfs.c
index 2b62d4b8b..18d58f5ce 100644
--- a/contrib/exthdfs/exthdfs.c
+++ b/contrib/exthdfs/exthdfs.c
@@ -528,7 +528,7 @@ Datum hdfsprotocol_validate(PG_FUNCTION_ARGS)
 		}
 
 		/* Clean up temporarily created instances */
-		pfree(uri);
+		FreeExternalTableUri(uri);
 		if (nnaddr != NULL)
 		{
 			pfree(nnaddr);
diff --git a/contrib/exthive/exthive.c b/contrib/exthive/exthive.c
index 7c1f895a8..3e7043b4e 100644
--- a/contrib/exthive/exthive.c
+++ b/contrib/exthive/exthive.c
@@ -76,7 +76,7 @@ Datum hiveprotocol_blocklocation(PG_FUNCTION_ARGS) {
   }
 
   /* Clean up uri instance as we don't need it any longer */
-  pfree(uri);
+  FreeExternalTableUri(uri);
 
   /* Check all locations to get files to fetch location. */
   ListCell *lc = NULL;
@@ -201,7 +201,7 @@ Datum hiveprotocol_blocklocation(PG_FUNCTION_ARGS) {
     }
 
     /* Clean up URI instance in loop as we don't need it any longer */
-    pfree(uri);
+    FreeExternalTableUri(uri);
 
     /* Clean up file info array created by the lib for this location. */
     FscHdfsFreeFileInfoArrayC(&fiarray);