fixed memleak
authorMartin Willi <martin@strongswan.org>
Tue, 22 May 2007 09:38:42 +0000 (09:38 -0000)
committerMartin Willi <martin@strongswan.org>
Tue, 22 May 2007 09:38:42 +0000 (09:38 -0000)
src/charon/sa/tasks/ike_config.c

index 4db6e2c..6bfab8c 100644 (file)
@@ -314,6 +314,7 @@ static status_t build_r(private_ike_config_t *this, message_t *message)
                        if (ip == NULL || ip->is_anyaddr(ip))
                        {
                                DBG1(DBG_IKE, "not assigning a virtual IP to peer");
+                               DESTROY_IF(ip);
                                return SUCCESS;
                        }
                        DBG1(DBG_IKE, "assigning virtual IP %H to peer", ip);