diff options
author | Daniel Gustafsson | 2024-12-09 19:58:23 +0000 |
---|---|---|
committer | Daniel Gustafsson | 2024-12-09 19:58:23 +0000 |
commit | 73a392d236965f14b84c0d09f011bda2cba6f8ca (patch) | |
tree | 9621980fc230b8419d355a74c1a3573c3f992bb8 | |
parent | 0a27c3d0f733c132a4c5122e749a619d02937a8a (diff) |
Fix small memory leaks in GUC checks
Follow-up commit to a9d58bfe8a3a. Backpatch down to v16 where
this was added in order to keep the code consistent for future
backpatches.
Author: Tofig Aliev <[email protected]>
Reviewed-by: Daniel Gustafsson <[email protected]>
Reviewed-by: Masahiko Sawada <[email protected]>
Discussion: https://postgr.es/m/[email protected]
Backpatch-through: 16
-rw-r--r-- | src/backend/commands/variable.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/backend/commands/variable.c b/src/backend/commands/variable.c index 0ecff94d0ed..2c8059e8d89 100644 --- a/src/backend/commands/variable.c +++ b/src/backend/commands/variable.c @@ -1092,6 +1092,8 @@ check_application_name(char **newval, void **extra, GucSource source) return false; } + guc_free(*newval); + pfree(clean); *newval = ret; return true; @@ -1128,6 +1130,8 @@ check_cluster_name(char **newval, void **extra, GucSource source) return false; } + guc_free(*newval); + pfree(clean); *newval = ret; return true; |