Commit bd7dd4c
authored
Fix issue 2093: pfree() called with a NULL pointer (#2095)
Fixed issue 2093 where pfree() was called with a NULL pointer.
The issue is due to some confusion with pfree(). There are 2
definitions for it, one that checks for a passed NULL and the
other which does not.
Created a function, pfree_if_not_null(), to check for NULL and
call pfree() if a NULL wasn't passed.
Modified the pfree references in the following files -
src/backend/commands/label_commands.c
src/backend/executor/cypher_merge.c
src/backend/executor/cypher_set.c
src/backend/parser/ag_scanner.l
src/backend/parser/cypher_analyze.c
src/backend/parser/cypher_expr.c
src/backend/parser/cypher_gram.y
src/backend/parser/cypher_parse_agg.c
src/backend/utils/adt/age_global_graph.c
src/backend/utils/adt/age_graphid_ds.c
src/backend/utils/adt/age_session_info.c
src/backend/utils/adt/age_vle.c
src/backend/utils/adt/agtype.c
src/backend/utils/adt/agtype_gin.c
src/backend/utils/adt/agtype_raw.c
src/backend/utils/adt/agtype_util.c
src/backend/utils/load/ag_load_edges.c
src/backend/utils/load/ag_load_labels.c
src/include/utils/age_graphid_ds.h
src/include/utils/age_session_info.h
src/include/utils/agtype.h
Added regression tests for the original issue.1 parent 0f0d9be commit bd7dd4c
File tree
23 files changed
+141
-100
lines changed- regress
- expected
- sql
- src
- backend
- commands
- executor
- parser
- utils
- adt
- load
- include/utils
23 files changed
+141
-100
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8786 | 8786 | | |
8787 | 8787 | | |
8788 | 8788 | | |
| 8789 | + | |
| 8790 | + | |
| 8791 | + | |
| 8792 | + | |
| 8793 | + | |
| 8794 | + | |
| 8795 | + | |
| 8796 | + | |
| 8797 | + | |
| 8798 | + | |
| 8799 | + | |
| 8800 | + | |
| 8801 | + | |
| 8802 | + | |
| 8803 | + | |
8789 | 8804 | | |
8790 | 8805 | | |
8791 | 8806 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3544 | 3544 | | |
3545 | 3545 | | |
3546 | 3546 | | |
| 3547 | + | |
| 3548 | + | |
| 3549 | + | |
| 3550 | + | |
| 3551 | + | |
| 3552 | + | |
3547 | 3553 | | |
3548 | 3554 | | |
3549 | 3555 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
120 | | - | |
| 120 | + | |
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
346 | 346 | | |
347 | 347 | | |
348 | 348 | | |
349 | | - | |
| 349 | + | |
350 | 350 | | |
351 | 351 | | |
352 | 352 | | |
| |||
893 | 893 | | |
894 | 894 | | |
895 | 895 | | |
896 | | - | |
| 896 | + | |
897 | 897 | | |
898 | 898 | | |
899 | | - | |
| 899 | + | |
900 | 900 | | |
901 | 901 | | |
902 | 902 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
596 | 596 | | |
597 | 597 | | |
598 | 598 | | |
599 | | - | |
| 599 | + | |
600 | 600 | | |
601 | 601 | | |
602 | 602 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
37 | 38 | | |
38 | 39 | | |
39 | 40 | | |
| |||
794 | 795 | | |
795 | 796 | | |
796 | 797 | | |
797 | | - | |
| 798 | + | |
798 | 799 | | |
799 | 800 | | |
800 | 801 | | |
| |||
811 | 812 | | |
812 | 813 | | |
813 | 814 | | |
814 | | - | |
| 815 | + | |
815 | 816 | | |
816 | 817 | | |
817 | 818 | | |
| |||
824 | 825 | | |
825 | 826 | | |
826 | 827 | | |
827 | | - | |
| 828 | + | |
828 | 829 | | |
829 | 830 | | |
830 | 831 | | |
| |||
1119 | 1120 | | |
1120 | 1121 | | |
1121 | 1122 | | |
1122 | | - | |
1123 | | - | |
| 1123 | + | |
| 1124 | + | |
1124 | 1125 | | |
1125 | 1126 | | |
1126 | 1127 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
116 | | - | |
| 116 | + | |
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
| |||
303 | 303 | | |
304 | 304 | | |
305 | 305 | | |
306 | | - | |
| 306 | + | |
307 | 307 | | |
308 | 308 | | |
309 | 309 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1688 | 1688 | | |
1689 | 1689 | | |
1690 | 1690 | | |
1691 | | - | |
| 1691 | + | |
1692 | 1692 | | |
1693 | 1693 | | |
1694 | 1694 | | |
| |||
1743 | 1743 | | |
1744 | 1744 | | |
1745 | 1745 | | |
1746 | | - | |
| 1746 | + | |
1747 | 1747 | | |
1748 | 1748 | | |
1749 | 1749 | | |
| |||
1754 | 1754 | | |
1755 | 1755 | | |
1756 | 1756 | | |
1757 | | - | |
| 1757 | + | |
1758 | 1758 | | |
1759 | 1759 | | |
1760 | 1760 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
| |||
2924 | 2925 | | |
2925 | 2926 | | |
2926 | 2927 | | |
2927 | | - | |
| 2928 | + | |
2928 | 2929 | | |
2929 | 2930 | | |
2930 | 2931 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
| |||
817 | 818 | | |
818 | 819 | | |
819 | 820 | | |
820 | | - | |
| 821 | + | |
821 | 822 | | |
822 | 823 | | |
823 | 824 | | |
| |||
857 | 858 | | |
858 | 859 | | |
859 | 860 | | |
860 | | - | |
| 861 | + | |
861 | 862 | | |
862 | 863 | | |
863 | 864 | | |
| |||
0 commit comments