Merge pull request #94 from darkfronza/PG-203_possible_memory_leak

PG-203: Fix memory leak.
This commit is contained in:
Ibrar Ahmed
2021-08-23 21:30:54 +05:00
committed by GitHub

View File

@@ -1693,7 +1693,6 @@ pg_stat_monitor_internal(FunctionCallInfo fcinfo,
uint64 planid = entry->key.planid;
uint64 appid = entry->key.appid;
unsigned char *buf = pgss_qbuf[bucketid];
char *query_txt = (char*) malloc(PGSM_QUERY_MAX_LEN);
#if PG_VERSION_NUM < 140000
bool is_allowed_role = is_member_of_role(GetUserId(), DEFAULT_ROLE_READ_ALL_STATS);
#else