Changeset 4364


Ignore:
Timestamp:
2012-05-11 17:02:38 (2 years ago)
Author:
drobilla
Message:

Fix memory leaks.

Location:
trunk/ingen/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/ingen/src/server/Engine.cpp

    r4363 r4364  
    9191 
    9292    delete _maid; 
     93    delete _pre_processor; 
    9394    delete _post_processor; 
    9495    delete _node_factory; 
     
    9697    delete _control_bindings; 
    9798    delete _broadcaster; 
     99    delete _event_writer; 
    98100 
    99101    munlockall(); 
  • trunk/ingen/src/server/NodeFactory.cpp

    r4344 r4364  
    129129        _plugins.insert(make_pair(uri, ingen_plugin)); 
    130130    } 
     131    lilv_node_free(node); 
    131132} 
    132133 
  • trunk/ingen/src/socket/Socket.cpp

    r4347 r4364  
    7171} 
    7272 
     73Socket::~Socket() 
     74{ 
     75    free(_addr); 
     76    close(); 
     77} 
     78 
    7379bool 
    7480Socket::set_addr(const std::string& uri) 
    7581{ 
     82    free(_addr); 
    7683    if (_type == UNIX && uri.substr(0, strlen("unix://")) == "unix://") { 
    7784        const std::string   path  = uri.substr(strlen("unix://")); 
     
    106113        _addr_len = ainfo->ai_addrlen; 
    107114        memcpy(_addr, ainfo->ai_addr, ainfo->ai_addrlen); 
     115        freeaddrinfo(ainfo); 
    108116        return true; 
    109117    } 
  • trunk/ingen/src/socket/Socket.hpp

    r4347 r4364  
    5656           int                fd); 
    5757 
    58     ~Socket() { close(); } 
     58    ~Socket(); 
    5959 
    6060    /** Bind a server socket to an address. 
Note: See TracChangeset for help on using the changeset viewer.