Skip to content

Commit 73a392d

Browse files
Fix small memory leaks in GUC checks
Follow-up commit to a9d58bf. Backpatch down to v16 where this was added in order to keep the code consistent for future backpatches. Author: Tofig Aliev <t.aliev@postgrespro.ru> Reviewed-by: Daniel Gustafsson <daniel@yesql.se> Reviewed-by: Masahiko Sawada <sawada.mshk@gmail.com> Discussion: https://postgr.es/m/bba4313fdde9db46db279f96f3b748b1@postgrespro.ru Backpatch-through: 16
1 parent 0a27c3d commit 73a392d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/backend/commands/variable.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1092,6 +1092,8 @@ check_application_name(char **newval, void **extra, GucSource source)
10921092
return false;
10931093
}
10941094

1095+
guc_free(*newval);
1096+
10951097
pfree(clean);
10961098
*newval = ret;
10971099
return true;
@@ -1128,6 +1130,8 @@ check_cluster_name(char **newval, void **extra, GucSource source)
11281130
return false;
11291131
}
11301132

1133+
guc_free(*newval);
1134+
11311135
pfree(clean);
11321136
*newval = ret;
11331137
return true;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy