Always deref filter context on flow-delete (#1093)

Signed-off-by: Alan Jowett <alan.jowett@microsoft.com>

Co-authored-by: Alan Jowett <alan.jowett@microsoft.com>
This commit is contained in:
Alan Jowett 2022-05-12 15:42:20 -06:00 коммит произвёл GitHub
Родитель e3f06ffc05
Коммит 67baea13b5
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 4 добавлений и 4 удалений

Просмотреть файл

@ -457,14 +457,14 @@ net_ebpf_extension_sock_ops_flow_delete(uint16_t layer_id, uint32_t callout_id,
if (local_flow_context == NULL)
goto Exit;
if (local_flow_context->client_detached)
// Since the hook client is detached, exit the function.
goto Exit;
filter_context = local_flow_context->filter_context;
if (filter_context == NULL)
goto Exit;
if (local_flow_context->client_detached)
// Since the hook client is detached, exit the function.
goto Exit;
attached_client = (net_ebpf_extension_hook_client_t*)filter_context->client_context;
if (attached_client == NULL)
// This means that the eBPF program is detached and there is nothing to notify.