drop mem_alloc and mem_free, use my own hand crafted optmized macros that
[apps/madmutt.git] / mutt_ssl.c
index 1fb7aa5..801da78 100644 (file)
@@ -22,6 +22,8 @@
 
 #include <string.h>
 
+#include <lib-lib/mem.h>
+
 #include "mutt.h"
 #include "mutt_socket.h"
 #include "mutt_menu.h"
@@ -120,11 +122,11 @@ int mutt_ssl_starttls (CONNECTION * conn)
   return 0;
 
 bail_ssl:
-  mem_free (&ssldata->ssl);
+  p_delete(&ssldata->ssl);
 bail_ctx:
-  mem_free (&ssldata->ctx);
+  p_delete(&ssldata->ctx);
 bail_ssldata:
-  mem_free (&ssldata);
+  p_delete(&ssldata);
 bail:
   return -1;
 }
@@ -350,7 +352,7 @@ static int ssl_socket_close (CONNECTION * conn)
 #endif
     SSL_free (data->ssl);
     SSL_CTX_free (data->ctx);
-    mem_free (&conn->sockdata);
+    p_delete(&conn->sockdata);
   }
 
   return raw_socket_close (conn);