Initiate consumes a child_sa reference, so get an additional one.
[strongswan.git] / src / libcharon / plugins / android / android_service.c
index e5ff758..d417294 100644 (file)
@@ -210,6 +210,8 @@ static job_requeue_t initiate(private_android_service_t *this)
                                                                                         0, "255.255.255.255", 65535);
        child_cfg->add_traffic_selector(child_cfg, FALSE, ts);
        peer_cfg->add_child_cfg(peer_cfg, child_cfg);
+       /* get an additional reference because initiate consumes one */
+       child_cfg->get_ref(child_cfg);
 
        /*this->listener.ike_up_down = ike_up_down;
        this->listener.child_up_down = child_up_down;