Hi,
On Wed, 2014-10-22 at 11:09 +0300, Hannu Mallat wrote:
> In the case where agent disappears from D-Bus while there are pending
> requests, request->driver may become null. As it's useless to send a
> Cancel to a nonexistent agent, not to mention accessing null pointer
> causes a crash, check for the pointer value before creating a D-Bus
> message.
> ---
> src/agent.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/src/agent.c b/src/agent.c
> index a340026..f67b30f 100644
> --- a/src/agent.c
> +++ b/src/agent.c
> @@ -166,6 +166,9 @@ static int send_cancel_request(struct connman_agent
> *agent,
> {
> DBusMessage *message;
>
> + if (!request->driver)
> + return 0;
> +
Mmmm, but the above can only happen in Jolla's version of ConnMan, there
is/was commit 81195279ed07af08caf8c44fc390840b54b19ce2 in the Mer/Jolla
tree that caused ->driver to become NULL in some special circumstances.
Cheers,
Patrik
_______________________________________________
connman mailing list
[email protected]
https://lists.connman.net/mailman/listinfo/connman