Skip to content

Commit 9add1bb

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 556f7b7 commit 9add1bb

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
@@ -1082,6 +1082,8 @@ check_application_name(char **newval, void **extra, GucSource source)
10821082
return false;
10831083
}
10841084

1085+
guc_free(*newval);
1086+
10851087
pfree(clean);
10861088
*newval = ret;
10871089
return true;
@@ -1118,6 +1120,8 @@ check_cluster_name(char **newval, void **extra, GucSource source)
11181120
return false;
11191121
}
11201122

1123+
guc_free(*newval);
1124+
11211125
pfree(clean);
11221126
*newval = ret;
11231127
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