Fix use-after-free
cover Fix use-after-free
Hi Denis,
It looks like the static analyzer is reporting a false alarm and the recent change is causing a regression, so I suggest reverting one commit.
Denis Grigorev (1):
Revert "cbs: Fix possible NULL dereference"
src/cbs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Signature · 1 line
2.17.1
PATCH 1/1 Revert "cbs: Fix possible NULL dereference"
At the time cbs_unregister() is called, cbs->netreg has already been cleared in netreg_watch(), so __ofono_modem_remove_atom_watch() is not called, resulting in a use-after-free later.
This reverts commit 5b528ee0fa699f598995772060e28653897e748f.
--- src/cbs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
src/cbs.c +1 -1
@@ -593,7 +593,7 @@ static void cbs_unregister(struct ofono_atom *atom) cbs->settings =NULL ; } -if (cbs->netreg_watch && cbs->netreg) { +if (cbs->netreg_watch) {if (cbs->location_watch) {__ofono_netreg_remove_status_watch (cbs->netreg, cbs->location_watch);
Signature · 1 line
2.17.1
This patch was applied to ofono.git (master) by Denis Kenzior <[email protected]>:
Hello:
This patch was applied to ofono.git (master)
by Denis Kenzior <[email protected]>:
Quoted 10 lines · On Tue, 30 Jul 2024 12:13:31 +0300 you wrote:
Hi Denis,
It looks like the static analyzer is reporting a false alarm and the recent change is causing a regression, so I suggest reverting one commit.
Denis Grigorev (1):
Revert "cbs: Fix possible NULL dereference"[...]
Here is the summary with links:
- [1/1] Revert "cbs: Fix possible NULL dereference"
https://git.kernel.org/pub/scm/network/ofono/ofono.git/?id=91e7548b52b7
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html