From: Pauli Virtanen <pav@iki.fi>
To: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
Cc: Bastien Nocera <hadess@hadess.net>, linux-bluetooth@vger.kernel.org
Subject: Re: [BlueZ v3 0/6] Add helper for "cleanup" variable attribute
Date: Tue, 12 May 2026 23:40:01 +0300 [thread overview]
Message-ID: <fa6f77805bd81b200a0af16287fb81c3fc16e7b2.camel@iki.fi> (raw)
In-Reply-To: <CABBYNZ+RZH25K0jhRsrTbYOZxQQeV9EvxYK907sgGW0Ot-mR3Q@mail.gmail.com>
ti, 2026-05-12 kello 15:38 -0400, Luiz Augusto von Dentz kirjoitti:
> Hi Bastien,
>
> On Tue, May 12, 2026 at 3:21 PM <patchwork-bot+bluetooth@kernel.org> wrote:
> >
> > Hello:
> >
> > This series was applied to bluetooth/bluez.git (master)
> > by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:
> >
> > On Mon, 11 May 2026 15:18:03 +0200 you wrote:
> > > As discussed in:
> > > https://lore.kernel.org/linux-bluetooth/ed949f2550f79a4bef19bd482bf8b069ad5b7e0c.camel@hadess.net/
> > >
> > > Implement a cleanup helper.
> > >
> > > The MIN/MAX fix is here because it touches the same hunk in src/main.c
> > > as the other patches. Feel free to pick it up straight away while the
> > > rest is discussed.
> > >
> > > [...]
> >
> > Here is the summary with links:
> > - [BlueZ,v3,1/6] all: Remove more unneeded MIN/MAX macro definition
> > https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=ca2b39b0c08e
> > - [BlueZ,v3,2/6] shared/util: Add helper for "cleanup" variable attribute
> > (no matching commit)
> > - [BlueZ,v3,3/6] doc: Recommend using _cleanup_ and friends
> > https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=9ba6c13df5fb
> > - [BlueZ,v3,4/6] main: Use _cleanup_() to simplify configuration parsing
> > https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=140e3569295c
> > - [BlueZ,v3,5/6] client: Use _cleanup_fd_ to simplify urandom access
> > https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=e33f5027b898
> > - [BlueZ,v3,6/6] btattach: Use _cleanup_fd_ to simplify error paths
> > https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=02aa9a8cfe6a
> >
> > You are awesome, thank you!
> > --
> > Deet-doot-dot, I am a bot.
> > https://korg.docs.kernel.org/patchwork/pwbot.html
>
> We will probably need to revert the cleanup changes, they are causing
> crashes and other problems when run under Valgrind.
>
> bluetoothd[941151]: src/main.c:parse_config() parsing src/main.conf
> ==941151== Invalid free() / delete / delete[] / realloc()
> ==941151== at 0x4BADE43: free (vg_replace_malloc.c:990)
> ==941151== by 0x4CC0444: g_free (in /usr/lib64/libglib-2.0.so.0.8400.4)
> ==941151== by 0x4003098: parse_config_hex (main.c:961)
> ==941151== by 0x4003098: parse_general (main.c:1058)
> ==941151== by 0x4003098: parse_config (main.c:1341)
> ==941151== by 0x4003098: main (main.c:1616)
> ==941151== Address 0x1fff000100 is on thread 1's stack
> ==941151== in frame #2, created by main (main.c:1570)
> ==941151==
> ==941151== Invalid free() / delete / delete[] / realloc()
> ==941151== at 0x4BADE43: free (vg_replace_malloc.c:990)
> ==941151== by 0x4CC0444: g_free (in /usr/lib64/libglib-2.0.so.0.8400.4)
> ==941151== by 0x40F17EE: parse_config_int (main.c:467)
> ==941151== by 0x40F1ECD: parse_config_u32.constprop.0.isra.0 (main.c:848)
> ==941151== by 0x40030BD: parse_general (bluetooth.c:4925)
> ==941151== by 0x40030BD: parse_config (main.c:1341)
> ==941151== by 0x40030BD: main (main.c:1616)
> ==941151== Address 0x1fff000050 is on thread 1's stack
> ==941151== in frame #2, created by parse_config_int (main.c:465)
> ==941151==
> ==941151== Invalid free() / delete / delete[] / realloc()
> ==941151== at 0x4BADE43: free (vg_replace_malloc.c:990)
> ==941151== by 0x4CC0444: g_free (in /usr/lib64/libglib-2.0.so.0.8400.4)
> ==941151== by 0x4004C89: parse_device_id (main.c:974)
> ==941151== by 0x4004C89: parse_general (main.c:1067)
> ==941151== by 0x4004C89: parse_config (main.c:1341)
> ==941151== by 0x4004C89: main (main.c:1616)
> ==941151== Address 0x1fff000100 is on thread 1's stack
> ==941151== in frame #2, created by main (main.c:1570)
> ==941151==
> bluetoothd[941151]: src/main.c:parse_config_string() General.ControllerMode = le
> bluetoothd[941151]: GLib: g_error_free: assertion 'error != NULL' failed
> bluetoothd[941151]: ++++++++ backtrace ++++++++
> bluetoothd[941151]: #1 log_handler+0x4e (src/main.c:1418) [0x40f0ffe]
> bluetoothd[941151]: #2 g_logv+0x247
> (/usr/lib64/libglib-2.0.so.0.8400.4) [0x4cc5477]
> bluetoothd[941151]: #3 g_log+0x93
> (/usr/lib64/libglib-2.0.so.0.8400.4) [0x4cc5803]
> bluetoothd[941151]: #4 parse_config_string+0x60 (src/main.c:208) [0x40f1400]
> bluetoothd[941151]: #5 main+0x4a2 (src/main.c:988) [0x4003262]
> bluetoothd[941151]: #6 __libc_start_call_main+0x75
> (/usr/lib64/libc.so.6) [0x4f90575]
> bluetoothd[941151]: #7 __libc_start_main@@GLIBC_2.34+0x88
> (/usr/lib64/libc.so.6) [0x4f90628]
> bluetoothd[941151]: #8 _start+0x25
> (/home/vudentz/git/bluez/src/bluetoothd) [0x40054c5]
> bluetoothd[941151]: +++++++++++++++++++++++++++
> ==941151== Invalid free() / delete / delete[] / realloc()
> ==941151== at 0x4BADE43: free (vg_replace_malloc.c:990)
> ==941151== by 0x4CC0444: g_free (in /usr/lib64/libglib-2.0.so.0.8400.4)
> ==941151== by 0x4003311: parse_ctrl_mode (bluetooth.c:5033)
> ==941151== by 0x4003311: parse_general (main.c:1074)
> ==941151== by 0x4003311: parse_config (main.c:1341)
> ==941151== by 0x4003311: main (main.c:1616)
> ==941151== Address 0x1fff000100 is on thread 1's stack
> ==941151== in frame #2, created by main (bluetooth.c:1570)
> ==941151==
> ==941151== Invalid free() / delete / delete[] / realloc()
> ==941151== at 0x4BADE43: free (vg_replace_malloc.c:990)
> ==941151== by 0x4CC0444: g_free (in /usr/lib64/libglib-2.0.so.0.8400.4)
> ==941151== by 0x40F17EE: parse_config_int (main.c:467)
> ==941151== by 0x40F20C2: parse_config_u16.isra.0 (main.c:863)
> ==941151== by 0x4003349: parse_general (bluetooth.c:2985)
> ==941151== by 0x4003349: parse_config (main.c:1341)
> ==941151== by 0x4003349: main (main.c:1616)
> ==941151== Address 0x1fff000050 is on thread 1's stack
> ==941151== in frame #2, created by parse_config_int (main.c:465)
> ==941151==
> ==941151== Invalid free() / delete / delete[] / realloc()
> ==941151== at 0x4BADE43: free (vg_replace_malloc.c:990)
> ==941151== by 0x4CC0444: g_free (in /usr/lib64/libglib-2.0.so.0.8400.4)
> ==941151== by 0x4004F55: parse_multi_profile (main.c:996)
> ==941151== by 0x4004F55: parse_general (main.c:1078)
> ==941151== by 0x4004F55: parse_config (main.c:1341)
> ==941151== by 0x4004F55: main (main.c:1616)
> ==941151== Address 0x1fff000100 is on thread 1's stack
> ==941151== in frame #2, created by main (main.c:1570)
> ==941151==
> ==941151== Invalid free() / delete / delete[] / realloc()
> ==941151== at 0x4BADE43: free (vg_replace_malloc.c:990)
> ==941151== by 0x4CC0444: g_free (in /usr/lib64/libglib-2.0.so.0.8400.4)
> ==941151== by 0x40F15D4: parse_privacy (main.c:910)
> ==941151== by 0x40033F9: parse_general (main.c:1081)
> ==941151== by 0x40033F9: parse_config (main.c:1341)
> ==941151== by 0x40033F9: main (main.c:1616)
> ==941151== Address 0x1fff000098 is on thread 1's stack
> ==941151== in frame #2, created by parse_privacy (main.c:909)
> ==941151==
> ==941151== Invalid free() / delete / delete[] / realloc()
> ==941151== at 0x4BADE43: free (vg_replace_malloc.c:990)
> ==941151== by 0x4CC0444: g_free (in /usr/lib64/libglib-2.0.so.0.8400.4)
> ==941151== by 0x40047B5: parse_repairing (main.c:947)
> ==941151== by 0x40047B5: parse_general (main.c:1082)
> ==941151== by 0x40047B5: parse_config (main.c:1341)
> ==941151== by 0x40047B5: main (main.c:1616)
> ==941151== Address 0x1fff000100 is on thread 1's stack
> ==941151== in frame #2, created by main (main.c:1570)
> ==941151==
> ==941151== Invalid free() / delete / delete[] / realloc()
> ==941151== at 0x4BADE43: free (vg_replace_malloc.c:990)
> ==941151== by 0x4CC0444: g_free (in /usr/lib64/libglib-2.0.so.0.8400.4)
> ==941151== by 0x40049FF: parse_secure_conns (bluetooth.c:1597)
> ==941151== by 0x40049FF: parse_general (main.c:1088)
> ==941151== by 0x40049FF: parse_config (main.c:1341)
> ==941151== by 0x40049FF: main (main.c:1616)
> ==941151== Address 0x1fff000100 is on thread 1's stack
> ==941151== in frame #2, created by main (bluetooth.c:1570)
> ==941151==
> bluetoothd[941151]: src/main.c:parse_config_bool() General.Experimental = true
> bluetoothd[941151]: GLib: g_error_free: assertion 'error != NULL' failed
> bluetoothd[941151]: ++++++++ backtrace ++++++++
> bluetoothd[941151]: #1 log_handler+0x4e (src/main.c:1418) [0x40f0ffe]
> bluetoothd[941151]: #2 g_logv+0x247
> (/usr/lib64/libglib-2.0.so.0.8400.4) [0x4cc5477]
> bluetoothd[941151]: #3 g_log+0x93
> (/usr/lib64/libglib-2.0.so.0.8400.4) [0x4cc5803]
> bluetoothd[941151]: #4 parse_config_bool.isra.0+0x64 (src/main.c:208)
> [0x40f1f64]
> bluetoothd[941151]: #5 main+0x7c0 (src/main.c:1089) [0x4003580]
> bluetoothd[941151]: #6 __libc_start_call_main+0x75
> (/usr/lib64/libc.so.6) [0x4f90575]
> bluetoothd[941151]: #7 __libc_start_main@@GLIBC_2.34+0x88
> (/usr/lib64/libc.so.6) [0x4f90628]
> bluetoothd[941151]: #8 _start+0x25
> (/home/vudentz/git/bluez/src/bluetoothd) [0x40054c5]
> bluetoothd[941151]: +++++++++++++++++++++++++++
> bluetoothd[941151]: src/main.c:parse_config_string()
> General.KernelExperimental = 6fbaf188-05e0-496a-9885-d6ddfdb4e03e
> bluetoothd[941151]: GLib: g_error_free: assertion 'error != NULL' failed
> bluetoothd[941151]: ++++++++ backtrace ++++++++
> bluetoothd[941151]: #1 log_handler+0x4e (src/main.c:1418) [0x40f0ffe]
> bluetoothd[941151]: #2 g_logv+0x247
> (/usr/lib64/libglib-2.0.so.0.8400.4) [0x4cc5477]
> bluetoothd[941151]: #3 g_log+0x93
> (/usr/lib64/libglib-2.0.so.0.8400.4) [0x4cc5803]
> bluetoothd[941151]: #4 parse_config_string+0x60 (src/main.c:208) [0x40f1400]
> bluetoothd[941151]: #5 main+0x816 (src/main.c:1032) [0x40035d6]
> bluetoothd[941151]: #6 __libc_start_call_main+0x75
> (/usr/lib64/libc.so.6) [0x4f90575]
> bluetoothd[941151]: #7 __libc_start_main@@GLIBC_2.34+0x88
> (/usr/lib64/libc.so.6) [0x4f90628]
> bluetoothd[941151]: #8 _start+0x25
> (/home/vudentz/git/bluez/src/bluetoothd) [0x40054c5]
> bluetoothd[941151]: +++++++++++++++++++++++++++
> bluetoothd[941151]: src/main.c:btd_parse_kernel_experimental()
> 6fbaf188-05e0-496a-9885-d6ddfdb4e03e
> ==941151== Invalid free() / delete / delete[] / realloc()
> ==941151== at 0x4BADE43: free (vg_replace_malloc.c:990)
> ==941151== by 0x4CC0444: g_free (in /usr/lib64/libglib-2.0.so.0.8400.4)
> ==941151== by 0x4003607: parse_kernel_exp (main.c:1030)
> ==941151== by 0x4003607: parse_general (main.c:1093)
> ==941151== by 0x4003607: parse_config (main.c:1341)
> ==941151== by 0x4003607: main (main.c:1616)
> ==941151== Address 0x1fff000100 is on thread 1's stack
> ==941151== in frame #2, created by main (main.c:1570)
> ==941151==
> ==941151== Invalid free() / delete / delete[] / realloc()
> ==941151== at 0x4BADE43: free (vg_replace_malloc.c:990)
> ==941151== by 0x4CC0444: g_free (in /usr/lib64/libglib-2.0.so.0.8400.4)
> ==941151== by 0x40F17EE: parse_config_int (main.c:467)
> ==941151== by 0x40F19B8: parse_mode_config (main.c:552)
> ==941151== by 0x40036D5: parse_le_config (bluetooth.c:2879)
> ==941151== by 0x40036D5: parse_config (main.c:1343)
> ==941151== by 0x40036D5: main (main.c:1616)
> ==941151== Address 0x1fff000020 is on thread 1's stack
> ==941151== in frame #2, created by parse_config_int (main.c:465)
> ==941151==
> ==941151== Invalid free() / delete / delete[] / realloc()
> ==941151== at 0x4BADE43: free (vg_replace_malloc.c:990)
> ==941151== by 0x4CC0444: g_free (in /usr/lib64/libglib-2.0.so.0.8400.4)
> ==941151== by 0x4004C4B: parse_gatt_cache (main.c:1103)
> ==941151== by 0x4004C4B: parse_gatt (main.c:1171)
> ==941151== by 0x4004C4B: parse_config (main.c:1344)
> ==941151== by 0x4004C4B: main (main.c:1616)
> ==941151== Address 0x1fff000100 is on thread 1's stack
> ==941151== in frame #2, created by main (main.c:1570)
> ==941151==
> ==941151== Invalid free() / delete / delete[] / realloc()
> ==941151== at 0x4BADE43: free (vg_replace_malloc.c:990)
> ==941151== by 0x4CC0444: g_free (in /usr/lib64/libglib-2.0.so.0.8400.4)
> ==941151== by 0x40F17EE: parse_config_int (main.c:467)
> ==941151== by 0x40F2072: parse_config_u8.isra.0 (main.c:878)
> ==941151== by 0x40037E5: parse_gatt (bluetooth.c:2847)
> ==941151== by 0x40037E5: parse_config (main.c:1344)
> ==941151== by 0x40037E5: main (main.c:1616)
> ==941151== Address 0x1fff000050 is on thread 1's stack
> ==941151== in frame #2, created by parse_config_int (main.c:465)
> ==941151==
> bluetoothd[941151]: src/main.c:parse_config_string()
> GATT.ExportClaimedServices = read-write
> bluetoothd[941151]: GLib: g_error_free: assertion 'error != NULL' failed
> bluetoothd[941151]: ++++++++ backtrace ++++++++
> bluetoothd[941151]: #1 log_handler+0x4e (src/main.c:1418) [0x40f0ffe]
> bluetoothd[941151]: #2 g_logv+0x247
> (/usr/lib64/libglib-2.0.so.0.8400.4) [0x4cc5477]
> bluetoothd[941151]: #3 g_log+0x93
> (/usr/lib64/libglib-2.0.so.0.8400.4) [0x4cc5803]
> bluetoothd[941151]: #4 parse_config_string+0x60 (src/main.c:208) [0x40f1400]
> bluetoothd[941151]: #5 main+0xae3 (src/main.c:1132) [0x40038a3]
> bluetoothd[941151]: #6 __libc_start_call_main+0x75
> (/usr/lib64/libc.so.6) [0x4f90575]
> bluetoothd[941151]: #7 __libc_start_main@@GLIBC_2.34+0x88
> (/usr/lib64/libc.so.6) [0x4f90628]
> bluetoothd[941151]: #8 _start+0x25
> (/home/vudentz/git/bluez/src/bluetoothd) [0x40054c5]
> bluetoothd[941151]: +++++++++++++++++++++++++++
> ==941151== Invalid free() / delete / delete[] / realloc()
> ==941151== at 0x4BADE43: free (vg_replace_malloc.c:990)
> ==941151== by 0x4CC0444: g_free (in /usr/lib64/libglib-2.0.so.0.8400.4)
> ==941151== by 0x400395E: parse_gatt_export (main.c:1129)
> ==941151== by 0x400395E: parse_gatt (main.c:1178)
> ==941151== by 0x400395E: parse_config (main.c:1344)
> ==941151== by 0x400395E: main (main.c:1616)
> ==941151== Address 0x1fff000100 is on thread 1's stack
> ==941151== in frame #2, created by main (main.c:1570)
> ==941151==
> ==941151== Invalid free() / delete / delete[] / realloc()
> ==941151== at 0x4BADE43: free (vg_replace_malloc.c:990)
> ==941151== by 0x4CC0444: g_free (in /usr/lib64/libglib-2.0.so.0.8400.4)
> ==941151== by 0x40040AD: parse_gatt_seclevel (main.c:1157)
> ==941151== by 0x40040AD: parse_gatt (main.c:1179)
> ==941151== by 0x40040AD: parse_config (main.c:1344)
> ==941151== by 0x40040AD: main (main.c:1616)
> ==941151== Address 0x1fff000100 is on thread 1's stack
> ==941151== in frame #2, created by main (main.c:1570)
> ==941151==
> ==941151== Invalid free() / delete / delete[] / realloc()
> ==941151== at 0x4BADE43: free (vg_replace_malloc.c:990)
> ==941151== by 0x4CC0444: g_free (in /usr/lib64/libglib-2.0.so.0.8400.4)
> ==941151== by 0x4004A1E: parse_csis_sirk (bluetooth.c:1593)
> ==941151== by 0x4004A1E: parse_csis (main.c:1197)
> ==941151== by 0x4004A1E: parse_config (main.c:1345)
> ==941151== by 0x4004A1E: main (main.c:1616)
> ==941151== Address 0x1fff000100 is on thread 1's stack
> ==941151== in frame #2, created by main (bluetooth.c:1570)
> ==941151==
> ==941151== Invalid free() / delete / delete[] / realloc()
> ==941151== at 0x4BADE43: free (vg_replace_malloc.c:990)
> ==941151== by 0x4CC0444: g_free (in /usr/lib64/libglib-2.0.so.0.8400.4)
> ==941151== by 0x4004A3D: parse_avdtp_session_mode (main.c:1276)
> ==941151== by 0x4004A3D: parse_avdtp (main.c:1310)
> ==941151== by 0x4004A3D: parse_config (main.c:1346)
> ==941151== by 0x4004A3D: main (main.c:1616)
> ==941151== Address 0x1fff000100 is on thread 1's stack
> ==941151== in frame #2, created by main (main.c:1570)
> ==941151==
> ==941151== Invalid free() / delete / delete[] / realloc()
> ==941151== at 0x4BADE43: free (vg_replace_malloc.c:990)
> ==941151== by 0x4CC0444: g_free (in /usr/lib64/libglib-2.0.so.0.8400.4)
> ==941151== by 0x4004A5C: parse_avdtp_stream_mode (main.c:1293)
> ==941151== by 0x4004A5C: parse_avdtp (main.c:1311)
> ==941151== by 0x4004A5C: parse_config (main.c:1346)
> ==941151== by 0x4004A5C: main (main.c:1616)
> ==941151== Address 0x1fff000100 is on thread 1's stack
> ==941151== in frame #2, created by main (main.c:1570)
> ==941151==
> ==941151== Invalid free() / delete / delete[] / realloc()
> ==941151== at 0x4BADE43: free (vg_replace_malloc.c:990)
> ==941151== by 0x4CC0444: g_free (in /usr/lib64/libglib-2.0.so.0.8400.4)
> ==941151== by 0x4004417: parse_cs_role (bluetooth.c:943)
> ==941151== by 0x4004417: parse_le_cs_config (main.c:1264)
> ==941151== by 0x4004417: parse_config (main.c:1348)
> ==941151== by 0x4004417: main (main.c:1616)
> ==941151== Address 0x1fff0000f8 is on thread 1's stack
> ==941151== in frame #2, created by main (bluetooth.c:1570)
> ==941151==
> ==941151== Invalid free() / delete / delete[] / realloc()
> ==941151== at 0x4BADE43: free (vg_replace_malloc.c:990)
> ==941151== by 0x4CC0444: g_free (in /usr/lib64/libglib-2.0.so.0.8400.4)
> ==941151== by 0x40044FB: parse_config_signed_int (main.c:501)
> ==941151== by 0x40044FB: parse_le_cs_config (main.c:1269)
> ==941151== by 0x40044FB: parse_config (main.c:1348)
> ==941151== by 0x40044FB: main (main.c:1616)
> ==941151== Address 0x1fff0000f8 is on thread 1's stack
> ==941151== in frame #2, created by main (main.c:1570)
> ==941151==
I think it needed something like the below.
I think it would be better to have _steal_() and _steal_fd_() be macros
so that compiler can check the types so you can't mistake
_steal_(keyfile) and _steal_(&keyfile)
https://gitlab.freedesktop.org/pipewire/pipewire/-/blob/master/spa/include/spa/utils/cleanup.h
Not sure what can be done about the _cleanup_(g_free) char *str --- it
would be great if this generated compiler warning/error but it looks
like it didn't, so maybe this macro should be private so you're forced
to declare the CLEANUP_FREEFUNC always.
diff --git a/src/main.c b/src/main.c
index 9053e74aa..9d1074c11 100644
--- a/src/main.c
+++ b/src/main.c
@@ -205,8 +205,20 @@ static const struct group_table {
{ }
};
-CLEANUP_FREEFUNC(GError, g_error_free);
-CLEANUP_FREEFUNC(GKeyFile, g_key_file_free);
+static void cleanup_g_error(GError *err)
+{
+ if (err)
+ g_error_free(err);
+}
+
+static void cleanup_g_key_file(GKeyFile *keyfile)
+{
+ if (keyfile)
+ g_key_file_free(keyfile);
+}
+
+CLEANUP_FREEFUNC(GError, cleanup_g_error);
+CLEANUP_FREEFUNC(GKeyFile, cleanup_g_key_file);
static int8_t check_sirk_alpha_numeric(char *str)
{
@@ -291,7 +303,7 @@ static GKeyFile *load_config(const char *name)
return NULL;
}
- return _steal_(keyfile);
+ return _steal_(&keyfile);
}
static void parse_did(const char *did)
@@ -457,12 +469,19 @@ static bool parse_config_string(GKeyFile *config,
const char *group,
return true;
}
+static inline void cleanup_g_free(void *p)
+{
+ g_free(*(void **) p);
+}
+
+#define _cleanup_g_free_ _cleanup_(cleanup_g_free)
+
static bool parse_config_int(GKeyFile *config, const char *group,
const char *key, int *val,
size_t min, size_t max)
{
size_t tmp;
- _cleanup_(g_free) char *str = NULL;
+ _cleanup_g_free_ char *str = NULL;
char *endptr = NULL;
if (!parse_config_string(config, group, key, &str))
and so on for the rest of _cleanup_(g_free)
--
Pauli Virtanen
prev parent reply other threads:[~2026-05-12 20:40 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-11 13:18 [BlueZ v3 0/6] Add helper for "cleanup" variable attribute Bastien Nocera
2026-05-11 13:18 ` [BlueZ v3 1/6] all: Remove more unneeded MIN/MAX macro definition Bastien Nocera
2026-05-11 17:27 ` Add helper for "cleanup" variable attribute bluez.test.bot
2026-05-11 13:18 ` [BlueZ v3 2/6] shared/util: " Bastien Nocera
2026-05-11 13:18 ` [BlueZ v3 3/6] doc: Recommend using _cleanup_ and friends Bastien Nocera
2026-05-11 13:18 ` [BlueZ v3 4/6] main: Use _cleanup_() to simplify configuration parsing Bastien Nocera
2026-05-11 13:35 ` [BlueZ,v3,4/6] " bluez.test.bot
2026-05-11 13:18 ` [BlueZ v3 5/6] client: Use _cleanup_fd_ to simplify urandom access Bastien Nocera
2026-05-11 13:18 ` [BlueZ v3 6/6] btattach: Use _cleanup_fd_ to simplify error paths Bastien Nocera
2026-05-12 19:20 ` [BlueZ v3 0/6] Add helper for "cleanup" variable attribute patchwork-bot+bluetooth
2026-05-12 19:38 ` Luiz Augusto von Dentz
2026-05-12 20:12 ` Bastien Nocera
2026-05-12 20:40 ` Pauli Virtanen [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=fa6f77805bd81b200a0af16287fb81c3fc16e7b2.camel@iki.fi \
--to=pav@iki.fi \
--cc=hadess@hadess.net \
--cc=linux-bluetooth@vger.kernel.org \
--cc=luiz.dentz@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox