Content-Length: 273891 | pFad | http://github.com/postgrespro/postgres/commit/73a392d236965f14b84c0d09f011bda2cba6f8ca

9F Fix small memory leaks in GUC checks · postgrespro/postgres@73a392d · GitHub
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)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/73a392d236965f14b84c0d09f011bda2cba6f8ca

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy