[bluez/bluez] faa9d5: lib: Add bt_realloc
hudsonzuo <[email protected]>
| Newsgroups | org.kernel.vger.linux-bluetooth |
|---|---|
| Message-ID | <bluez/bluez/push/refs/heads/1133053/[email protected]> |
Branch: refs/heads/1133053
Home: https://github.com/bluez/bluez
Commit: faa9d5c52f9083c39c6bae7c3eef18de3b6910f9
https://github.com/bluez/bluez/commit/faa9d5c52f9083c39c6bae7c3eef18de3b6910f9
Author: zuohsh <[email protected]>
Date: 2026-07-23 (Thu, 23 Jul 2026)
Changed paths:
M lib/bluetooth/bluetooth.c
M lib/bluetooth/bluetooth.h
M lib/bluetooth/sdp.c
M src/shared/ad.c
M src/shared/bap.c
Log Message:
-----------
lib: Add bt_realloc
Add a bt_realloc wrapper that takes a pointer-to-pointer and only updates
the original on success, so that a failed realloc cannot leak the
existing buffer or leave a NULL pointer for the caller to dereference.
shared/ad: use bt_realloc in bt_ad_add_data(),
bt_ad_add_manufacturer_data() and bt_ad_add_service_data().
shared/bap: use bt_realloc in ascs_ase_rsp_add().
lib/sdp: use bt_realloc in sdp_service_attr_req(), sdp_process() and
sdp_service_search_attr_req().
To unsubscribe from these emails, change your notification settings at https://github.com/bluez/bluez/settings/notifications