Commit 02abcf3
patch 9.2.0257: unnecessary memory allocation in set_callback()
Problem: Unnecessary memory allocation in set_callback(); after
set_callback(), callers must manually free the source
callback's name if cb_free_name is set.
Solution: Refactor set_callback() to re-use the callback name when
possible to avoid extra memory allocations and clean up so the
callers do not have to take care themselves (Shane Harper).
closes: #19831
Signed-off-by: Shane Harper <[email protected]>
Signed-off-by: Christian Brabandt <[email protected]>1 parent 06aa378 commit 02abcf3
10 files changed
Lines changed: 12 additions & 34 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
373 | 373 | | |
374 | 374 | | |
375 | 375 | | |
376 | | - | |
377 | | - | |
378 | 376 | | |
379 | 377 | | |
380 | 378 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3789 | 3789 | | |
3790 | 3790 | | |
3791 | 3791 | | |
3792 | | - | |
3793 | | - | |
3794 | 3792 | | |
3795 | 3793 | | |
3796 | 3794 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5289 | 5289 | | |
5290 | 5290 | | |
5291 | 5291 | | |
| 5292 | + | |
| 5293 | + | |
| 5294 | + | |
| 5295 | + | |
| 5296 | + | |
| 5297 | + | |
| 5298 | + | |
5292 | 5299 | | |
5293 | 5300 | | |
5294 | 5301 | | |
5295 | 5302 | | |
5296 | 5303 | | |
5297 | 5304 | | |
5298 | 5305 | | |
5299 | | - | |
| 5306 | + | |
| 5307 | + | |
5300 | 5308 | | |
5301 | | - | |
5302 | 5309 | | |
5303 | 5310 | | |
5304 | 5311 | | |
5305 | | - | |
5306 | | - | |
5307 | | - | |
5308 | | - | |
5309 | | - | |
5310 | | - | |
5311 | | - | |
| 5312 | + | |
5312 | 5313 | | |
5313 | 5314 | | |
5314 | 5315 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1699 | 1699 | | |
1700 | 1700 | | |
1701 | 1701 | | |
1702 | | - | |
1703 | | - | |
1704 | 1702 | | |
1705 | 1703 | | |
1706 | 1704 | | |
| |||
1728 | 1726 | | |
1729 | 1727 | | |
1730 | 1728 | | |
1731 | | - | |
1732 | | - | |
1733 | 1729 | | |
1734 | 1730 | | |
1735 | 1731 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9239 | 9239 | | |
9240 | 9240 | | |
9241 | 9241 | | |
9242 | | - | |
9243 | | - | |
9244 | 9242 | | |
9245 | 9243 | | |
9246 | 9244 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1037 | 1037 | | |
1038 | 1038 | | |
1039 | 1039 | | |
1040 | | - | |
1041 | | - | |
1042 | 1040 | | |
1043 | 1041 | | |
1044 | 1042 | | |
| |||
1069 | 1067 | | |
1070 | 1068 | | |
1071 | 1069 | | |
1072 | | - | |
1073 | | - | |
1074 | | - | |
1075 | 1070 | | |
1076 | 1071 | | |
1077 | 1072 | | |
| |||
2527 | 2522 | | |
2528 | 2523 | | |
2529 | 2524 | | |
2530 | | - | |
2531 | | - | |
2532 | 2525 | | |
2533 | 2526 | | |
2534 | 2527 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8158 | 8158 | | |
8159 | 8159 | | |
8160 | 8160 | | |
8161 | | - | |
8162 | 8161 | | |
8163 | | - | |
8164 | | - | |
8165 | | - | |
8166 | 8162 | | |
8167 | 8163 | | |
8168 | 8164 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
67 | | - | |
68 | 66 | | |
69 | 67 | | |
70 | 68 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
912 | 912 | | |
913 | 913 | | |
914 | 914 | | |
915 | | - | |
916 | | - | |
917 | 915 | | |
918 | 916 | | |
919 | 917 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
734 | 734 | | |
735 | 735 | | |
736 | 736 | | |
| 737 | + | |
| 738 | + | |
737 | 739 | | |
738 | 740 | | |
739 | 741 | | |
| |||
0 commit comments