Maemo: Initiate consumes a child_sa reference, so get an additional one.
authorTobias Brunner <tobias@strongswan.org>
Fri, 24 Sep 2010 14:27:02 +0000 (16:27 +0200)
committerTobias Brunner <tobias@strongswan.org>
Thu, 14 Oct 2010 15:36:19 +0000 (17:36 +0200)
src/libcharon/plugins/maemo/maemo_plugin.c

index 042b7d4..48f832a 100644 (file)
@@ -198,6 +198,8 @@ static gboolean initiate_connection(private_maemo_plugin_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);
 
        if (charon->controller->initiate(charon->controller, peer_cfg, child_cfg,
                                                                         controller_cb_empty, NULL) != SUCCESS)