forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitb1aebbb
committed
Various Coverity-spotted fixes
A number of issues were identified by the Coverity scanner and areaddressed in this patch. None of these appear to be security issuesand many are mostly cosmetic changes.Short comments for each of the changes follows.Correct the semi-colon placement in be-secure.c regarding SSL retries.Remove a useless comparison-to-NULL in proc.c (value is dereferenced prior to this check and therefore can't be NULL).Add checking of chmod() return values to initdb.Fix a couple minor memory leaks in initdb.Fix memory leak in pg_ctl- involves free'ing the config file contents.Use an int to capture fgetc() return instead of an enum in pg_dump.Fix minor memory leaks in pg_dump. (note minor change to convertOperatorReference()'s API)Check fclose()/remove() return codes in psql.Check fstat(), find_my_exec() return codes in psql.Various ECPG memory leak fixes.Check find_my_exec() return in ECPG.Explicitly ignore pqFlush return in libpq error-path.Change PQfnumber() to avoid doing an strdup() when no changes required.Remove a few useless check-against-NULL's (value deref'd beforehand).Check rmtree(), malloc() results in pg_regress.Also check get_alternative_expectfile() return in pg_regress.1 parent9662143 commitb1aebbb
File tree
16 files changed
+290
-73
lines changed- src
- backend
- libpq
- storage/lmgr
- bin
- initdb
- pg_ctl
- pg_dump
- psql
- interfaces
- ecpg
- ecpglib
- preproc
- libpq
- test/regress
16 files changed
+290
-73
lines changedLines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
371 | 371 |
| |
372 | 372 |
| |
373 | 373 |
| |
374 |
| - | |
| 374 | + | |
375 | 375 |
| |
376 | 376 |
| |
377 | 377 |
| |
|
Lines changed: 1 addition & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1158 | 1158 |
| |
1159 | 1159 |
| |
1160 | 1160 |
| |
1161 |
| - | |
1162 |
| - | |
| 1161 | + | |
1163 | 1162 |
| |
1164 | 1163 |
| |
1165 | 1164 |
| |
|
Lines changed: 31 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1293 | 1293 |
| |
1294 | 1294 |
| |
1295 | 1295 |
| |
1296 |
| - | |
| 1296 | + | |
| 1297 | + | |
| 1298 | + | |
| 1299 | + | |
| 1300 | + | |
| 1301 | + | |
1297 | 1302 |
| |
1298 | 1303 |
| |
1299 | 1304 |
| |
| |||
1308 | 1313 |
| |
1309 | 1314 |
| |
1310 | 1315 |
| |
1311 |
| - | |
| 1316 | + | |
| 1317 | + | |
| 1318 | + | |
| 1319 | + | |
| 1320 | + | |
| 1321 | + | |
1312 | 1322 |
| |
1313 | 1323 |
| |
1314 | 1324 |
| |
| |||
1387 | 1397 |
| |
1388 | 1398 |
| |
1389 | 1399 |
| |
1390 |
| - | |
| 1400 | + | |
| 1401 | + | |
| 1402 | + | |
| 1403 | + | |
| 1404 | + | |
| 1405 | + | |
1391 | 1406 |
| |
1392 | 1407 |
| |
1393 | 1408 |
| |
| |||
1398 | 1413 |
| |
1399 | 1414 |
| |
1400 | 1415 |
| |
1401 |
| - | |
| 1416 | + | |
| 1417 | + | |
| 1418 | + | |
| 1419 | + | |
| 1420 | + | |
| 1421 | + | |
1402 | 1422 |
| |
1403 | 1423 |
| |
1404 | 1424 |
| |
| |||
1957 | 1977 |
| |
1958 | 1978 |
| |
1959 | 1979 |
| |
| 1980 | + | |
| 1981 | + | |
| 1982 | + | |
1960 | 1983 |
| |
1961 |
| - | |
| 1984 | + | |
| 1985 | + | |
| 1986 | + | |
| 1987 | + | |
1962 | 1988 |
| |
1963 | 1989 |
| |
1964 | 1990 |
| |
|
Lines changed: 34 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
154 | 154 |
| |
155 | 155 |
| |
156 | 156 |
| |
| 157 | + | |
157 | 158 |
| |
158 | 159 |
| |
159 | 160 |
| |
| |||
369 | 370 |
| |
370 | 371 |
| |
371 | 372 |
| |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
372 | 391 |
| |
373 | 392 |
| |
374 | 393 |
| |
| |||
572 | 591 |
| |
573 | 592 |
| |
574 | 593 |
| |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
575 | 601 |
| |
576 | 602 |
| |
577 | 603 |
| |
| |||
708 | 734 |
| |
709 | 735 |
| |
710 | 736 |
| |
| 737 | + | |
| 738 | + | |
| 739 | + | |
711 | 740 |
| |
712 | 741 |
| |
713 | 742 |
| |
| |||
1201 | 1230 |
| |
1202 | 1231 |
| |
1203 | 1232 |
| |
| 1233 | + | |
1204 | 1234 |
| |
1205 | 1235 |
| |
| 1236 | + | |
| 1237 | + | |
| 1238 | + | |
| 1239 | + | |
1206 | 1240 |
| |
1207 | 1241 |
| |
1208 | 1242 |
| |
|
Lines changed: 3 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1947 | 1947 |
| |
1948 | 1948 |
| |
1949 | 1949 |
| |
1950 |
| - | |
| 1950 | + | |
1951 | 1951 |
| |
| 1952 | + | |
| 1953 | + | |
1952 | 1954 |
| |
1953 | 1955 |
| |
1954 | 1956 |
| |
|
Lines changed: 54 additions & 25 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
234 | 234 |
| |
235 | 235 |
| |
236 | 236 |
| |
237 |
| - | |
| 237 | + | |
238 | 238 |
| |
239 |
| - | |
| 239 | + | |
240 | 240 |
| |
241 | 241 |
| |
242 | 242 |
| |
| |||
10246 | 10246 |
| |
10247 | 10247 |
| |
10248 | 10248 |
| |
| 10249 | + | |
| 10250 | + | |
10249 | 10251 |
| |
10250 | 10252 |
| |
10251 | 10253 |
| |
| |||
10352 | 10354 |
| |
10353 | 10355 |
| |
10354 | 10356 |
| |
10355 |
| - | |
10356 |
| - | |
| 10357 | + | |
| 10358 | + | |
| 10359 | + | |
| 10360 | + | |
| 10361 | + | |
| 10362 | + | |
10357 | 10363 |
| |
10358 | 10364 |
| |
10359 | 10365 |
| |
| |||
10388 | 10394 |
| |
10389 | 10395 |
| |
10390 | 10396 |
| |
10391 |
| - | |
10392 |
| - | |
10393 |
| - | |
| 10397 | + | |
| 10398 | + | |
| 10399 | + | |
| 10400 | + | |
| 10401 | + | |
| 10402 | + | |
10394 | 10403 |
| |
10395 |
| - | |
10396 |
| - | |
10397 |
| - | |
| 10404 | + | |
| 10405 | + | |
| 10406 | + | |
| 10407 | + | |
| 10408 | + | |
| 10409 | + | |
10398 | 10410 |
| |
10399 | 10411 |
| |
10400 | 10412 |
| |
10401 | 10413 |
| |
10402 | 10414 |
| |
10403 | 10415 |
| |
10404 | 10416 |
| |
10405 |
| - | |
10406 |
| - | |
10407 |
| - | |
| 10417 | + | |
| 10418 | + | |
| 10419 | + | |
| 10420 | + | |
| 10421 | + | |
| 10422 | + | |
10408 | 10423 |
| |
10409 |
| - | |
10410 |
| - | |
10411 |
| - | |
| 10424 | + | |
| 10425 | + | |
| 10426 | + | |
| 10427 | + | |
| 10428 | + | |
| 10429 | + | |
10412 | 10430 |
| |
10413 | 10431 |
| |
10414 | 10432 |
| |
| |||
10453 | 10471 |
| |
10454 | 10472 |
| |
10455 | 10473 |
| |
10456 |
| - | |
| 10474 | + | |
| 10475 | + | |
10457 | 10476 |
| |
10458 | 10477 |
| |
10459 | 10478 |
| |
10460 | 10479 |
| |
10461 |
| - | |
| 10480 | + | |
10462 | 10481 |
| |
10463 | 10482 |
| |
10464 | 10483 |
| |
| |||
10488 | 10507 |
| |
10489 | 10508 |
| |
10490 | 10509 |
| |
10491 |
| - | |
| 10510 | + | |
10492 | 10511 |
| |
10493 | 10512 |
| |
10494 | 10513 |
| |
10495 | 10514 |
| |
10496 | 10515 |
| |
10497 |
| - | |
| 10516 | + | |
| 10517 | + | |
10498 | 10518 |
| |
10499 | 10519 |
| |
10500 | 10520 |
| |
10501 | 10521 |
| |
10502 | 10522 |
| |
10503 | 10523 |
| |
10504 |
| - | |
| 10524 | + | |
10505 | 10525 |
| |
10506 | 10526 |
| |
10507 | 10527 |
| |
| |||
10549 | 10569 |
| |
10550 | 10570 |
| |
10551 | 10571 |
| |
10552 |
| - | |
| 10572 | + | |
10553 | 10573 |
| |
10554 | 10574 |
| |
10555 | 10575 |
| |
| |||
11522 | 11542 |
| |
11523 | 11543 |
| |
11524 | 11544 |
| |
| 11545 | + | |
11525 | 11546 |
| |
11526 | 11547 |
| |
11527 | 11548 |
| |
| |||
11665 | 11686 |
| |
11666 | 11687 |
| |
11667 | 11688 |
| |
| 11689 | + | |
| 11690 | + | |
| 11691 | + | |
| 11692 | + | |
| 11693 | + | |
| 11694 | + | |
11668 | 11695 |
| |
11669 | 11696 |
| |
11670 | 11697 |
| |
| |||
11709 | 11736 |
| |
11710 | 11737 |
| |
11711 | 11738 |
| |
11712 |
| - | |
11713 |
| - | |
| 11739 | + | |
| 11740 | + | |
11714 | 11741 |
| |
11715 | 11742 |
| |
11716 |
| - | |
| 11743 | + | |
| 11744 | + | |
11717 | 11745 |
| |
11718 | 11746 |
| |
11719 | 11747 |
| |
| |||
12413 | 12441 |
| |
12414 | 12442 |
| |
12415 | 12443 |
| |
| 12444 | + | |
12416 | 12445 |
| |
12417 | 12446 |
| |
12418 | 12447 |
| |
|
Lines changed: 9 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2027 | 2027 |
| |
2028 | 2028 |
| |
2029 | 2029 |
| |
2030 |
| - | |
2031 |
| - | |
| 2030 | + | |
| 2031 | + | |
| 2032 | + | |
| 2033 | + | |
| 2034 | + | |
| 2035 | + | |
| 2036 | + | |
2032 | 2037 |
| |
2033 | 2038 |
| |
2034 | 2039 |
| |
2035 | 2040 |
| |
2036 | 2041 |
| |
2037 |
| - | |
| 2042 | + | |
| 2043 | + | |
2038 | 2044 |
| |
2039 | 2045 |
| |
2040 | 2046 |
| |
|
0 commit comments
Comments
(0)