Changeset 4607

Show
Ignore:
Timestamp:
11/10/08 17:42:05 (2 months ago)
Author:
martin
Message:

fixed leak in host_create_from_string("%any")

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/libstrongswan/utils/host.c

    r4601 r4607  
    393393host_t *host_create_from_string(char *string, u_int16_t port) 
    394394{ 
    395     private_host_t *this = host_create_empty()
     395    private_host_t *this
    396396     
    397397    if (streq(string, "%any")) 
     
    399399        return host_create_any(AF_INET); 
    400400    } 
    401     else if (strchr(string, '.')) 
     401     
     402    this = host_create_empty(); 
     403    if (strchr(string, '.')) 
    402404    { 
    403405        this->address.sa_family = AF_INET; 
     
    407409        this->address.sa_family = AF_INET6; 
    408410    } 
    409  
    410411    switch (this->address.sa_family) 
    411412    {