drop mem_alloc and mem_free, use my own hand crafted optmized macros that
[apps/madmutt.git] / mutt_tunnel.c
index 34a5789..6c5a7a3 100644 (file)
@@ -12,6 +12,8 @@
 # include "config.h"
 #endif
 
+#include <lib-lib/mem.h>
+
 #include "mutt.h"
 #include "mutt_socket.h"
 #include "mutt_tunnel.h"
@@ -59,7 +61,7 @@ static int tunnel_socket_open (CONNECTION * conn)
   int rc;
   int pin[2], pout[2];
 
-  tunnel = (TUNNEL_DATA *) mem_malloc (sizeof (TUNNEL_DATA));
+  tunnel = p_new(TUNNEL_DATA, 1);
   conn->sockdata = tunnel;
 
   mutt_message (_("Connecting with \"%s\"..."), Tunnel);
@@ -129,7 +131,7 @@ static int tunnel_socket_close (CONNECTION * conn)
                NONULL(mutt_strsysexit(WEXITSTATUS(status))));
     mutt_sleep (2);
   }
-  mem_free (&conn->sockdata);
+  p_delete(&conn->sockdata);
   return 0;
 }