]> git.ipfire.org Git - thirdparty/openwrt.git/commit
hostapd: consistent reference counting for registry
authorMatthew Cather <mattbob4@gmail.com>
Mon, 3 Mar 2025 20:00:35 +0000 (14:00 -0600)
committerFelix Fietkau <nbd@nbd.name>
Wed, 5 Mar 2025 07:04:52 +0000 (08:04 +0100)
commit1af7bf38f7e78becefc0b5af503bde735c58f767
tree969cde2fd131ba2060c768525cb379fc20a6aaa0
parentaf658023191d6fad252e1a08c9b8b1a23761d7a4
hostapd: consistent reference counting for registry

Since `wpa_ucode_registry_add` collects its own reference to the values added, the
two functions `hostapd_ucode_bss_get_uval` and `hostapd_ucode_iface_get_uval` would
sometimes return a referenced object (from `uc_resource_new`) and sometimes return
an unreferenced object (from `wpa_ucode_registry_get`). Now, both functions always
return a referenced object.

This change also indirectly fixes `hostapd_ucode_bss_get_uval`, ensuring it now
always returns a referenced object.

Signed-off-by: Matthew Cather <mattbob4@gmail.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 7729f960933a03c9eebd2b65a695ea57718ccb77)
package/network/services/hostapd/src/src/ap/ucode.c
package/network/services/hostapd/src/wpa_supplicant/ucode.c