forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit8485a25
committed
Fix assorted infelicities in new SetWALSegSize() function.
* Failure to check for malloc failure (ok, pretty unlikely here, butthat's not an excuse).* Leakage of open fd on read error, and of malloc'd buffer always.* Incorrect assumption that a short read would set errno to zero.* Failure to adhere to message style conventions (in particular,not reporting errno where relevant; using "couldn't open" rather than"could not open" is not really in line with project style either).* Missing newlines on some messages.Coverity spotted the leak problems; I noticed the rest whilefixing the leaks.1 parent6dda099 commit8485a25
1 file changed
+14
-6
lines changedLines changed: 14 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
408 | 408 |
| |
409 | 409 |
| |
410 | 410 |
| |
411 |
| - | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
412 | 414 |
| |
413 | 415 |
| |
414 | 416 |
| |
415 | 417 |
| |
416 | 418 |
| |
417 |
| - | |
418 |
| - | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
419 | 422 |
| |
420 | 423 |
| |
| 424 | + | |
| 425 | + | |
421 | 426 |
| |
422 | 427 |
| |
423 | 428 |
| |
| |||
433 | 438 |
| |
434 | 439 |
| |
435 | 440 |
| |
436 |
| - | |
437 | 441 |
| |
438 | 442 |
| |
439 | 443 |
| |
| |||
444 | 448 |
| |
445 | 449 |
| |
446 | 450 |
| |
447 |
| - | |
| 451 | + | |
448 | 452 |
| |
449 | 453 |
| |
450 | 454 |
| |
451 | 455 |
| |
452 | 456 |
| |
453 |
| - | |
| 457 | + | |
| 458 | + | |
454 | 459 |
| |
455 | 460 |
| |
456 | 461 |
| |
457 | 462 |
| |
| 463 | + | |
| 464 | + | |
| 465 | + | |
458 | 466 |
| |
459 | 467 |
| |
460 | 468 |
| |
|
0 commit comments
Comments
(0)