service: Make sure the pending reply is not lost
authorJukka Rissanen <jukka.rissanen@linux.intel.com>
Wed, 4 Jul 2012 08:21:27 +0000 (11:21 +0300)
committerMarcel Holtmann <marcel@holtmann.org>
Thu, 5 Jul 2012 17:23:14 +0000 (19:23 +0200)
The user data (pending reply) can be null if agent returns
an error. In this case do not overwrite the real pending reply.

src/service.c

index 72f5af4..fdd59d5 100644 (file)
@@ -3445,6 +3445,9 @@ void __connman_service_set_hidden_data(struct connman_service *service,
 
        DBG("service %p pending %p", service, pending);
 
+       if (pending == NULL)
+               return;
+
        check_pending_msg(service);
 
        service->pending = pending;