Skip to content
This repository has been archived by the owner on Jul 23, 2024. It is now read-only.

Commit

Permalink
HAWQ-1840. fix memory leak in hdfs/hive protocol external table
Browse files Browse the repository at this point in the history
  • Loading branch information
ztao1987 committed May 18, 2022
1 parent 73a4fbe commit 3bca85c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion contrib/exthdfs/exthdfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@ Datum hdfsprotocol_validate(PG_FUNCTION_ARGS)
}

/* Clean up temporarily created instances */
pfree(uri);
FreeExternalTableUri(uri);
if (nnaddr != NULL)
{
pfree(nnaddr);
Expand Down
4 changes: 2 additions & 2 deletions contrib/exthive/exthive.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 3bca85c

Please sign in to comment.