fixes an ast_netsock_list memory leak.
authorDavid Vossel <dvossel@digium.com>
Thu, 8 Oct 2009 19:35:30 +0000 (19:35 +0000)
committerDavid Vossel <dvossel@digium.com>
Thu, 8 Oct 2009 19:35:30 +0000 (19:35 +0000)
ABE-1998
Review: https://reviewboard.asterisk.org/r/395/

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@222873 65c4cc65-6c06-0410-ace0-fbb531ad65f3

include/asterisk/netsock.h
main/netsock.c

index 00a14b4..494efcf 100644 (file)
@@ -45,8 +45,6 @@ struct ast_netsock *ast_netsock_bind(struct ast_netsock_list *list, struct io_co
 struct ast_netsock *ast_netsock_bindaddr(struct ast_netsock_list *list, struct io_context *ioc,
                                         struct sockaddr_in *bindaddr, int tos, int cos, ast_io_cb callback, void *data);
 
-int ast_netsock_free(struct ast_netsock_list *list, struct ast_netsock *netsock);
-
 int ast_netsock_release(struct ast_netsock_list *list);
 
 struct ast_netsock *ast_netsock_find(struct ast_netsock_list *list,
index 24c6f12..e4cfb3b 100644 (file)
@@ -81,6 +81,7 @@ int ast_netsock_release(struct ast_netsock_list *list)
 {
        ASTOBJ_CONTAINER_DESTROYALL(list, ast_netsock_destroy);
        ASTOBJ_CONTAINER_DESTROY(list);
+       ast_free(list);
 
        return 0;
 }