X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=mutt_socket.c;h=1c3d8650d855f8c44cdb0ffe79c863abf3babdf4;hp=9029b3e11874f876ba2c4c743ce4eae783a6d4f4;hb=b3cb6ed8d36c550a2e589910ce51bbc8352ff57c;hpb=4f61fa445bff564984acf29fc91858af0ed2725e diff --git a/mutt_socket.c b/mutt_socket.c index 9029b3e..1c3d865 100644 --- a/mutt_socket.c +++ b/mutt_socket.c @@ -13,6 +13,8 @@ # include "config.h" #endif +#include + #include "mutt.h" #include "globals.h" #include "mutt_socket.h" @@ -189,7 +191,7 @@ void mutt_socket_free (CONNECTION * conn) /* head is special case, doesn't need prev updated */ if (iter == conn) { Connections = iter->next; - mem_free (&iter); + p_delete(&iter); return; } @@ -197,7 +199,7 @@ void mutt_socket_free (CONNECTION * conn) if (iter->next == conn) { tmp = iter->next; iter->next = tmp->next; - mem_free (&tmp); + p_delete(&tmp); return; } iter = iter->next; @@ -324,7 +326,7 @@ static CONNECTION *socket_new_conn (void) { CONNECTION *conn; - conn = (CONNECTION *) mem_calloc (1, sizeof (CONNECTION)); + conn = p_new(CONNECTION, 1); conn->fd = -1; return conn; @@ -404,7 +406,7 @@ int raw_socket_open (CONNECTION * conn) rc = getaddrinfo (host_idna, port, &hints, &res); # ifdef HAVE_LIBIDN - mem_free (&host_idna); + p_delete(&host_idna); # endif if (rc) { @@ -455,7 +457,7 @@ int raw_socket_open (CONNECTION * conn) if ((he = gethostbyname (host_idna)) == NULL) { # ifdef HAVE_LIBIDN - mem_free (&host_idna); + p_delete(&host_idna); # endif mutt_error (_("Could not find the host \"%s\""), conn->account.host); @@ -463,7 +465,7 @@ int raw_socket_open (CONNECTION * conn) } # ifdef HAVE_LIBIDN - mem_free (&host_idna); + p_delete(&host_idna); # endif mutt_message (_("Connecting to %s..."), conn->account.host);