]> git.ipfire.org Git - people/ms/strongswan.git/commitdiff
fixed memleak when installing synced virtual IPs
authorMartin Willi <martin@strongswan.org>
Fri, 29 May 2009 09:02:47 +0000 (11:02 +0200)
committerMartin Willi <martin@revosec.ch>
Wed, 7 Apr 2010 11:55:13 +0000 (13:55 +0200)
src/charon/plugins/ha_sync/ha_sync_dispatcher.c

index afb024a4fde951bc4cf37d6bc1cd82f3dc552f07..84f311c8a7da6c3975cfc434153bd14827d8db40 100644 (file)
@@ -228,9 +228,10 @@ static void process_ike_update(private_ha_sync_dispatcher_t *this,
                                ike_sa->set_other_host(ike_sa, value.host->clone(value.host));
                                break;
                        case HA_SYNC_LOCAL_VIP:
+                               ike_sa->set_virtual_ip(ike_sa, TRUE, value.host);
+                               break;
                        case HA_SYNC_REMOTE_VIP:
-                               ike_sa->set_virtual_ip(ike_sa, attribute == HA_SYNC_LOCAL_VIP,
-                                                                          value.host->clone(value.host));
+                               ike_sa->set_virtual_ip(ike_sa, FALSE, value.host);
                                break;
                        case HA_SYNC_ADDITIONAL_ADDR:
                                ike_sa->add_additional_address(ike_sa,