Skip to content
Snippets Groups Projects
  • Jonathan Wakely's avatar
    e6d10035
    libcody: Avoid double-free · e6d10035
    Jonathan Wakely authored
    If the listen call fails then 'goto fail' will jump to that label and
    use freeaddrinfo again. Set the pointer to null to prevent that.
    
    libcody/ChangeLog:
    
    	* netserver.cc (ListenInet6): Set pointer to null after
    	deallocation.
    e6d10035
    History
    libcody: Avoid double-free
    Jonathan Wakely authored
    If the listen call fails then 'goto fail' will jump to that label and
    use freeaddrinfo again. Set the pointer to null to prevent that.
    
    libcody/ChangeLog:
    
    	* netserver.cc (ListenInet6): Set pointer to null after
    	deallocation.