Commit a9d58bf
committed
Fix tiny memory leaks
Both check_application_name() and check_cluster_name() use
pg_clean_ascii() but didn't release the memory. Depending on when the
GUC is set, this might be cleaned up at some later time or it would
leak postmaster memory once. In any case, it seems better not to have
to rely on such analysis and make the code locally robust. Also, this
makes Valgrind happier.
Author: Masahiko Sawada <sawada.mshk@gmail.com>
Reviewed-by: Jacob Champion <jchampion@timescale.com>
Discussion: https://www.postgresql.org/message-id/CAD21AoBmFNy9MPfA0UUbMubQqH3AaK5U3mrv6pSeWrwCk3LJ8g@mail.gmail.com1 parent 83e42a0 commit a9d58bf
1 file changed
+16
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1025 | 1025 | | |
1026 | 1026 | | |
1027 | 1027 | | |
| 1028 | + | |
1028 | 1029 | | |
1029 | 1030 | | |
1030 | 1031 | | |
1031 | 1032 | | |
1032 | 1033 | | |
1033 | 1034 | | |
1034 | | - | |
1035 | | - | |
| 1035 | + | |
| 1036 | + | |
| 1037 | + | |
| 1038 | + | |
1036 | 1039 | | |
| 1040 | + | |
1037 | 1041 | | |
1038 | | - | |
| 1042 | + | |
| 1043 | + | |
1039 | 1044 | | |
1040 | 1045 | | |
1041 | 1046 | | |
| |||
1056 | 1061 | | |
1057 | 1062 | | |
1058 | 1063 | | |
| 1064 | + | |
1059 | 1065 | | |
1060 | 1066 | | |
1061 | 1067 | | |
1062 | 1068 | | |
1063 | 1069 | | |
1064 | 1070 | | |
1065 | | - | |
1066 | | - | |
| 1071 | + | |
| 1072 | + | |
| 1073 | + | |
| 1074 | + | |
1067 | 1075 | | |
| 1076 | + | |
1068 | 1077 | | |
1069 | | - | |
| 1078 | + | |
| 1079 | + | |
1070 | 1080 | | |
1071 | 1081 | | |
1072 | 1082 | | |
| |||
0 commit comments