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);