forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit1feff99
committed
Improve LDAP cleanup code in error paths.
After calling ldap_unbind_s() we probably shouldn't try to use the LDAPconnection again to call ldap_get_option(), even if it failed. The OpenLDAPman page for ldap_unbind[_s] says "Once it is called, the connection to theLDAP server is closed, and the ld structure is invalid." Otherwise, as ageneral rule we should probably call ldap_unbind() before returning in allpaths to avoid leaking resources. It is unlikely there is any practicalleak problem since failure to authenticate currently results in the backendexiting soon afterwards.Author: Thomas MunroReviewed-By: Alvaro Herrera, Peter EisentrautDiscussion:https://postgr.es/m/20170914141205.eup4kxzlkagtmfac%40alvherre.pgsql1 parent91d5f1a commit1feff99
1 file changed
+11
-9
lines changedLines changed: 11 additions & 9 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2331 | 2331 |
| |
2332 | 2332 |
| |
2333 | 2333 |
| |
2334 |
| - | |
2335 | 2334 |
| |
2336 | 2335 |
| |
| 2336 | + | |
2337 | 2337 |
| |
2338 | 2338 |
| |
2339 | 2339 |
| |
| |||
2360 | 2360 |
| |
2361 | 2361 |
| |
2362 | 2362 |
| |
2363 |
| - | |
2364 | 2363 |
| |
2365 | 2364 |
| |
| 2365 | + | |
2366 | 2366 |
| |
2367 | 2367 |
| |
2368 | 2368 |
| |
2369 | 2369 |
| |
2370 | 2370 |
| |
2371 |
| - | |
2372 | 2371 |
| |
2373 | 2372 |
| |
2374 | 2373 |
| |
| 2374 | + | |
2375 | 2375 |
| |
2376 | 2376 |
| |
2377 | 2377 |
| |
| |||
2384 | 2384 |
| |
2385 | 2385 |
| |
2386 | 2386 |
| |
2387 |
| - | |
2388 | 2387 |
| |
2389 | 2388 |
| |
| 2389 | + | |
2390 | 2390 |
| |
2391 | 2391 |
| |
2392 | 2392 |
| |
| |||
2491 | 2491 |
| |
2492 | 2492 |
| |
2493 | 2493 |
| |
| 2494 | + | |
2494 | 2495 |
| |
2495 | 2496 |
| |
2496 | 2497 |
| |
| |||
2508 | 2509 |
| |
2509 | 2510 |
| |
2510 | 2511 |
| |
| 2512 | + | |
2511 | 2513 |
| |
2512 | 2514 |
| |
2513 | 2515 |
| |
| |||
2533 | 2535 |
| |
2534 | 2536 |
| |
2535 | 2537 |
| |
| 2538 | + | |
2536 | 2539 |
| |
2537 | 2540 |
| |
2538 | 2541 |
| |
| |||
2554 | 2557 |
| |
2555 | 2558 |
| |
2556 | 2559 |
| |
| 2560 | + | |
2557 | 2561 |
| |
2558 | 2562 |
| |
2559 | 2563 |
| |
| |||
2570 | 2574 |
| |
2571 | 2575 |
| |
2572 | 2576 |
| |
| 2577 | + | |
2573 | 2578 |
| |
2574 | 2579 |
| |
2575 | 2580 |
| |
| |||
2585 | 2590 |
| |
2586 | 2591 |
| |
2587 | 2592 |
| |
2588 |
| - | |
2589 |
| - | |
2590 |
| - | |
2591 | 2593 |
| |
2592 |
| - | |
2593 |
| - | |
| 2594 | + | |
| 2595 | + | |
2594 | 2596 |
| |
2595 | 2597 |
| |
2596 | 2598 |
| |
|
0 commit comments
Comments
(0)