* [PATCH BlueZ] mesh: Fix crash after deleting all subscriptions
@ 2019-11-18 10:51 Michał Lowas-Rzechonek
2019-11-19 23:53 ` Gix, Brian
0 siblings, 1 reply; 2+ messages in thread
From: Michał Lowas-Rzechonek @ 2019-11-18 10:51 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Rafał Gajda
From: Rafał Gajda <rafal.gajda@silvair.com>
---
mesh/model.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/mesh/model.c b/mesh/model.c
index a06b684a5..40c5e6b18 100644
--- a/mesh/model.c
+++ b/mesh/model.c
@@ -1426,9 +1426,8 @@ int mesh_model_sub_del_all(struct mesh_node *node, uint16_t addr, uint32_t id)
for (; entry; entry = entry->next)
mesh_net_dst_unreg(net, (uint16_t) L_PTR_TO_UINT(entry->data));
- l_queue_destroy(mod->subs, NULL);
- l_queue_destroy(mod->virtuals, unref_virt);
- mod->virtuals = l_queue_new();
+ l_queue_clear(mod->subs, NULL);
+ l_queue_clear(mod->virtuals, unref_virt);
return MESH_STATUS_SUCCESS;
}
--
2.19.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH BlueZ] mesh: Fix crash after deleting all subscriptions
2019-11-18 10:51 [PATCH BlueZ] mesh: Fix crash after deleting all subscriptions Michał Lowas-Rzechonek
@ 2019-11-19 23:53 ` Gix, Brian
0 siblings, 0 replies; 2+ messages in thread
From: Gix, Brian @ 2019-11-19 23:53 UTC (permalink / raw)
To: michal.lowas-rzechonek, linux-bluetooth; +Cc: rafal.gajda
Applied, thanks
On Mon, 2019-11-18 at 11:51 +0100, Michał Lowas-Rzechonek wrote:
> From: Rafał Gajda <rafal.gajda@silvair.com>
>
> ---
> mesh/model.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/mesh/model.c b/mesh/model.c
> index a06b684a5..40c5e6b18 100644
> --- a/mesh/model.c
> +++ b/mesh/model.c
> @@ -1426,9 +1426,8 @@ int mesh_model_sub_del_all(struct mesh_node *node, uint16_t addr, uint32_t id)
> for (; entry; entry = entry->next)
> mesh_net_dst_unreg(net, (uint16_t) L_PTR_TO_UINT(entry->data));
>
> - l_queue_destroy(mod->subs, NULL);
> - l_queue_destroy(mod->virtuals, unref_virt);
> - mod->virtuals = l_queue_new();
> + l_queue_clear(mod->subs, NULL);
> + l_queue_clear(mod->virtuals, unref_virt);
>
> return MESH_STATUS_SUCCESS;
> }
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-11-19 23:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-18 10:51 [PATCH BlueZ] mesh: Fix crash after deleting all subscriptions Michał Lowas-Rzechonek
2019-11-19 23:53 ` Gix, Brian
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.