commit | cbed9fd785efdf8c62f55c39280bc6086917b1d3 | [log] [tgz] |
---|---|---|
author | Luca Burelli <l.burelli@arduino.cc> | Fri Dec 01 18:25:18 2023 +0100 |
committer | Anas Nashif <anas.nashif@intel.com> | Wed Dec 06 18:01:34 2023 -0500 |
tree | 103447beb3b836c615191e84e510acad30bda30b | |
parent | 5bf8edc85f83882a1380163aa10d81c2c3493848 [diff] |
llext: always initialize ext param in llext_load It is not safe to assume that on entry to llext_load, *ext contains either NULL or a previous reference to the same ext being loaded. For example, the shell sample was passing an uninitialized value. Initialize *ext from a search of the llext by name. If NULL, it is the first instance of this llext (and on load error, it stays that way). If not NULL, increment use count and return. Signed-off-by: Luca Burelli <l.burelli@arduino.cc>