Commit 02c408e
committed
Remove redundant null pointer checks before free()
Per applicable standards, free() with a null pointer is a no-op.
Systems that don't observe that are ancient and no longer relevant.
Some PostgreSQL code already required this behavior, so this change
does not introduce any new requirements, just makes the code more
consistent.
Discussion: https://www.postgresql.org/message-id/flat/dac5d2d0-98f5-94d9-8e69-46da2413593d%40enterprisedb.com1 parent 098c703 commit 02c408e
File tree
38 files changed
+214
-436
lines changed- contrib
- pg_stat_statements
- uuid-ossp
- src
- backend
- bootstrap
- libpq
- postmaster
- regex
- tcop
- utils
- adt
- error
- init
- misc
- bin
- pg_basebackup
- pg_dump
- pgbench
- psql
- common
- fe_utils
- interfaces
- ecpg
- pgtypeslib
- preproc
- libpq
- port
38 files changed
+214
-436
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
809 | 809 | | |
810 | 810 | | |
811 | 811 | | |
812 | | - | |
813 | | - | |
| 812 | + | |
814 | 813 | | |
815 | 814 | | |
816 | 815 | | |
| |||
1657 | 1656 | | |
1658 | 1657 | | |
1659 | 1658 | | |
1660 | | - | |
1661 | | - | |
| 1659 | + | |
1662 | 1660 | | |
1663 | 1661 | | |
1664 | 1662 | | |
| |||
1842 | 1840 | | |
1843 | 1841 | | |
1844 | 1842 | | |
1845 | | - | |
1846 | | - | |
| 1843 | + | |
1847 | 1844 | | |
1848 | 1845 | | |
1849 | 1846 | | |
| |||
2446 | 2443 | | |
2447 | 2444 | | |
2448 | 2445 | | |
2449 | | - | |
2450 | | - | |
| 2446 | + | |
2451 | 2447 | | |
2452 | 2448 | | |
2453 | 2449 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
292 | 292 | | |
293 | 293 | | |
294 | 294 | | |
295 | | - | |
296 | | - | |
| 295 | + | |
297 | 296 | | |
298 | 297 | | |
299 | 298 | | |
| |||
366 | 365 | | |
367 | 366 | | |
368 | 367 | | |
369 | | - | |
370 | | - | |
| 368 | + | |
371 | 369 | | |
372 | 370 | | |
373 | 371 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
288 | 288 | | |
289 | 289 | | |
290 | 290 | | |
291 | | - | |
292 | | - | |
| 291 | + | |
293 | 292 | | |
294 | 293 | | |
295 | 294 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2020 | 2020 | | |
2021 | 2021 | | |
2022 | 2022 | | |
2023 | | - | |
2024 | | - | |
2025 | | - | |
2026 | | - | |
| 2023 | + | |
2027 | 2024 | | |
2028 | 2025 | | |
2029 | 2026 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
854 | 854 | | |
855 | 855 | | |
856 | 856 | | |
857 | | - | |
858 | | - | |
| 857 | + | |
859 | 858 | | |
860 | 859 | | |
861 | 860 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
930 | 930 | | |
931 | 931 | | |
932 | 932 | | |
933 | | - | |
934 | | - | |
935 | | - | |
936 | | - | |
| 933 | + | |
| 934 | + | |
937 | 935 | | |
938 | 936 | | |
939 | 937 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3896 | 3896 | | |
3897 | 3897 | | |
3898 | 3898 | | |
3899 | | - | |
3900 | | - | |
| 3899 | + | |
3901 | 3900 | | |
3902 | 3901 | | |
3903 | 3902 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
374 | 374 | | |
375 | 375 | | |
376 | 376 | | |
377 | | - | |
378 | | - | |
379 | | - | |
380 | | - | |
381 | | - | |
382 | | - | |
383 | | - | |
384 | | - | |
385 | | - | |
386 | | - | |
387 | | - | |
388 | | - | |
389 | | - | |
390 | | - | |
391 | | - | |
392 | | - | |
393 | | - | |
394 | | - | |
395 | | - | |
396 | | - | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
397 | 387 | | |
398 | 388 | | |
399 | 389 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1985 | 1985 | | |
1986 | 1986 | | |
1987 | 1987 | | |
1988 | | - | |
1989 | | - | |
| 1988 | + | |
1990 | 1989 | | |
1991 | 1990 | | |
1992 | 1991 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
417 | 417 | | |
418 | 418 | | |
419 | 419 | | |
420 | | - | |
421 | | - | |
| 420 | + | |
422 | 421 | | |
423 | 422 | | |
424 | 423 | | |
| |||
0 commit comments