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 73a4fbecd HAWQ-1839. fix memory leak in hdfsprotocol_blocklocation 73a4fbecd is described below commit 73a4fbecd78ce86c651f57087297623a6044e86f Author: ztao1987 <zhenglin.ta...@gmail.com> AuthorDate: Fri May 6 17:42:39 2022 +0800 HAWQ-1839. fix memory leak in hdfsprotocol_blocklocation --- contrib/exthdfs/exthdfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/exthdfs/exthdfs.c b/contrib/exthdfs/exthdfs.c index 1d19e89fc..2b62d4b8b 100644 --- a/contrib/exthdfs/exthdfs.c +++ b/contrib/exthdfs/exthdfs.c @@ -92,7 +92,7 @@ Datum hdfsprotocol_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; @@ -222,7 +222,7 @@ Datum hdfsprotocol_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);