This repository was archived by the owner on Aug 31, 2021. It is now read-only.
Commit fc309f3
committed
[[ Bug 22010 ]] Fix memory leak when binding LCB foreign handlers
This patch fixes a memory leak which can occur when binding to LCB
foreign handlers. Previously, if a foreign handler was binding to
a C or Objective-C function and was present in an external code
library then a leak of the native code module handle wrapper could
occur.
This patch fixes the issue by holding any such handles in a per-module
array keyed by the name of the external native code library being loaded.1 parent b5e0e6b commit fc309f3
File tree
5 files changed
+101
-33
lines changed- docs/notes
- libscript
- include/libscript
- src
5 files changed
+101
-33
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
255 | 255 | | |
256 | 256 | | |
257 | 257 | | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
258 | 261 | | |
259 | 262 | | |
260 | 263 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
805 | 805 | | |
806 | 806 | | |
807 | 807 | | |
808 | | - | |
809 | | - | |
| 808 | + | |
810 | 809 | | |
811 | | - | |
| 810 | + | |
| 811 | + | |
| 812 | + | |
812 | 813 | | |
813 | | - | |
814 | | - | |
815 | | - | |
816 | | - | |
817 | | - | |
818 | | - | |
819 | | - | |
| 814 | + | |
820 | 815 | | |
821 | | - | |
822 | | - | |
823 | | - | |
824 | | - | |
| 816 | + | |
| 817 | + | |
825 | 818 | | |
826 | | - | |
| 819 | + | |
827 | 820 | | |
828 | | - | |
829 | | - | |
| 821 | + | |
830 | 822 | | |
831 | 823 | | |
832 | 824 | | |
| |||
948 | 940 | | |
949 | 941 | | |
950 | 942 | | |
951 | | - | |
952 | 943 | | |
953 | | - | |
954 | | - | |
955 | | - | |
956 | | - | |
957 | | - | |
| 944 | + | |
| 945 | + | |
| 946 | + | |
958 | 947 | | |
959 | | - | |
960 | | - | |
961 | | - | |
| 948 | + | |
962 | 949 | | |
963 | | - | |
964 | | - | |
965 | | - | |
966 | | - | |
| 950 | + | |
| 951 | + | |
967 | 952 | | |
968 | | - | |
| 953 | + | |
969 | 954 | | |
970 | | - | |
971 | | - | |
| 955 | + | |
972 | 956 | | |
973 | 957 | | |
974 | 958 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
284 | 284 | | |
285 | 285 | | |
286 | 286 | | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
287 | 294 | | |
288 | 295 | | |
289 | 296 | | |
| |||
909 | 916 | | |
910 | 917 | | |
911 | 918 | | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
| 923 | + | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
| 927 | + | |
| 928 | + | |
| 929 | + | |
| 930 | + | |
| 931 | + | |
| 932 | + | |
| 933 | + | |
| 934 | + | |
| 935 | + | |
| 936 | + | |
| 937 | + | |
| 938 | + | |
| 939 | + | |
| 940 | + | |
| 941 | + | |
| 942 | + | |
| 943 | + | |
| 944 | + | |
| 945 | + | |
| 946 | + | |
| 947 | + | |
| 948 | + | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
| 952 | + | |
| 953 | + | |
| 954 | + | |
| 955 | + | |
| 956 | + | |
| 957 | + | |
| 958 | + | |
| 959 | + | |
| 960 | + | |
| 961 | + | |
| 962 | + | |
| 963 | + | |
| 964 | + | |
| 965 | + | |
| 966 | + | |
| 967 | + | |
| 968 | + | |
| 969 | + | |
| 970 | + | |
| 971 | + | |
| 972 | + | |
| 973 | + | |
| 974 | + | |
| 975 | + | |
| 976 | + | |
| 977 | + | |
| 978 | + | |
| 979 | + | |
| 980 | + | |
| 981 | + | |
| 982 | + | |
| 983 | + | |
| 984 | + | |
| 985 | + | |
| 986 | + | |
912 | 987 | | |
913 | 988 | | |
914 | 989 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
512 | 512 | | |
513 | 513 | | |
514 | 514 | | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
515 | 520 | | |
516 | 521 | | |
517 | 522 | | |
| |||
0 commit comments