Commit 796fbb9
committed
fix: add defensive NULL checks on this_link in Cache_create
Add a check for `this_link` returning NULL immediately in
`Cache_create`, and guard the trailing `LinkTable_unref` call
to prevent potential segmentation faults in case the path cannot
be resolved.1 parent af4ee30 commit 796fbb9
1 file changed
Lines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
724 | 724 | | |
725 | 725 | | |
726 | 726 | | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
727 | 730 | | |
728 | 731 | | |
729 | 732 | | |
| |||
782 | 785 | | |
783 | 786 | | |
784 | 787 | | |
785 | | - | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
786 | 791 | | |
787 | 792 | | |
788 | 793 | | |
| |||
0 commit comments