Skip to content
Permalink
Browse files
HAWQ-1840. fix memory leak in hdfs/hive protocol external table
  • Loading branch information
ztao1987 committed May 18, 2022
1 parent 73a4fbe commit 3bca85c1d25ee505df63b6f4bf882b7a563b04d6
Showing 2 changed files with 3 additions and 3 deletions.
@@ -528,7 +528,7 @@ Datum hdfsprotocol_validate(PG_FUNCTION_ARGS)
}

/* Clean up temporarily created instances */
pfree(uri);
FreeExternalTableUri(uri);
if (nnaddr != NULL)
{
pfree(nnaddr);
@@ -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);

0 comments on commit 3bca85c

Please sign in to comment.