mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-11-18 18:29:29 +01:00
resolve: fix crash in resolve_exit
method.ops is NULL, which causes method.ops->exit to crash. This adds a check that method.ops is not NULL before dereferencing. Fixes: Aborting (signal 11) [/home/jprestwo/iwd/src/iwd] ++++++++ backtrace ++++++++ 0 0x7f016b59cf20 in /lib/x86_64-linux-gnu/libc.so.6 1 0x432057 in resolve_exit() at /home/jprestwo/iwd/src/resolve.c:295 2 0x403b61 in iwd_modules_exit() at /home/jprestwo/iwd/src/main.c:195 3 0x7f016b57fb97 in /lib/x86_64-linux-gnu/libc.so.6 +++++++++++++++++++++++++++
This commit is contained in:
parent
e5dedc3378
commit
5ca3c4495e
@ -292,7 +292,7 @@ static int resolve_init(void)
|
||||
|
||||
static void resolve_exit(void)
|
||||
{
|
||||
if (!method.ops->exit)
|
||||
if (!method.ops || !method.ops->exit)
|
||||
return;
|
||||
|
||||
method.ops->exit(method.data);
|
||||
|
Loading…
Reference in New Issue
Block a user