Commit 10a5252
committed
Fix some memory leaks and improve restricted token handling on Windows
The leaks have been detected by a Coverity run on Windows. No backpatch
is done as the leaks are minor.
While on it, make restricted token creation more consistent in its error
handling by logging an error instead of a warning if missing
advapi32.dll, which was missing in the NT4 days. Any modern platform
should have this DLL around. Now, if the library is not there, an error
is still reported back to the caller, and nothing is done do there is no
behavior change done in this commit.
Author: Ranier Vilela
Discussion: https://postgr.es/m/CAEudQApa9MG0foPkgPX87fipk=vhnF2Xfg+CfUyR08h4R7Mywg@mail.gmail.com1 parent 3ec20c7 commit 10a5252
File tree
3 files changed
+42
-12
lines changed- src
- backend
- libpq
- postmaster
- common
3 files changed
+42
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1387 | 1387 | | |
1388 | 1388 | | |
1389 | 1389 | | |
| 1390 | + | |
| 1391 | + | |
| 1392 | + | |
| 1393 | + | |
| 1394 | + | |
| 1395 | + | |
| 1396 | + | |
1390 | 1397 | | |
1391 | 1398 | | |
1392 | 1399 | | |
| |||
1402 | 1409 | | |
1403 | 1410 | | |
1404 | 1411 | | |
| 1412 | + | |
| 1413 | + | |
| 1414 | + | |
| 1415 | + | |
| 1416 | + | |
| 1417 | + | |
1405 | 1418 | | |
1406 | 1419 | | |
1407 | 1420 | | |
| |||
2517 | 2530 | | |
2518 | 2531 | | |
2519 | 2532 | | |
| 2533 | + | |
2520 | 2534 | | |
2521 | 2535 | | |
2522 | 2536 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4719 | 4719 | | |
4720 | 4720 | | |
4721 | 4721 | | |
| 4722 | + | |
| 4723 | + | |
4722 | 4724 | | |
4723 | 4725 | | |
4724 | 4726 | | |
| |||
4735 | 4737 | | |
4736 | 4738 | | |
4737 | 4739 | | |
| 4740 | + | |
| 4741 | + | |
4738 | 4742 | | |
4739 | 4743 | | |
4740 | 4744 | | |
| |||
4750 | 4754 | | |
4751 | 4755 | | |
4752 | 4756 | | |
| 4757 | + | |
| 4758 | + | |
4753 | 4759 | | |
4754 | 4760 | | |
4755 | 4761 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
44 | | - | |
| 43 | + | |
| 44 | + | |
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
| 55 | + | |
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
62 | | - | |
| 62 | + | |
63 | 63 | | |
64 | | - | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
65 | 67 | | |
66 | 68 | | |
| 69 | + | |
| 70 | + | |
67 | 71 | | |
68 | 72 | | |
69 | | - | |
70 | | - | |
71 | | - | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
72 | 76 | | |
73 | 77 | | |
74 | 78 | | |
75 | 79 | | |
76 | 80 | | |
77 | 81 | | |
78 | | - | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
79 | 85 | | |
80 | 86 | | |
81 | 87 | | |
| |||
88 | 94 | | |
89 | 95 | | |
90 | 96 | | |
91 | | - | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
92 | 101 | | |
93 | 102 | | |
94 | 103 | | |
| |||
171 | 180 | | |
172 | 181 | | |
173 | 182 | | |
174 | | - | |
175 | | - | |
| 183 | + | |
| 184 | + | |
176 | 185 | | |
177 | 186 | | |
178 | 187 | | |
| |||
187 | 196 | | |
188 | 197 | | |
189 | 198 | | |
| 199 | + | |
190 | 200 | | |
191 | 201 | | |
192 | 202 | | |
0 commit comments