]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
smtp: Post apop feature code tidy up
authorSteve Holme <steve_holme@hotmail.com>
Sat, 9 Jun 2012 18:22:29 +0000 (19:22 +0100)
committerSteve Holme <steve_holme@hotmail.com>
Sat, 9 Jun 2012 18:22:29 +0000 (19:22 +0100)
lib/smtp.c
lib/smtp.h

index 137f935383bb87d8b4ac1064a6b4bc66d886ea60..b10b260d0a202d341f695b57443cdbac84ea5a4e 100644 (file)
@@ -1549,11 +1549,13 @@ static CURLcode smtp_disconnect(struct connectdata *conn,
   if(!dead_connection && smtpc->pp.conn)
     (void)smtp_quit(conn); /* ignore errors on the LOGOUT */
 
+  /* Disconnect from the server */
   Curl_pp_disconnect(&smtpc->pp);
 
+  /* Cleanup the SASL module */
   Curl_sasl_cleanup(conn, smtpc->authused);
 
-  /* This won't already be freed in some error cases */
+  /* Cleanup our connection based variables */
   Curl_safefree(smtpc->domain);
 
   return CURLE_OK;
@@ -1570,8 +1572,6 @@ static CURLcode smtp_dophase_done(struct connectdata *conn, bool connected)
     /* no data to transfer */
     Curl_setup_transfer(conn, -1, -1, FALSE, NULL, -1, NULL);
 
-  Curl_safefree(smtpc->domain);
-
   return CURLE_OK;
 }
 
index 5235e2b2b9723dece0b6a7f9bc0d723e5158433a..38fd1b70af5043a59c4403f42d0ac39d2155abd2 100644 (file)
@@ -61,7 +61,7 @@ struct smtp_conn {
   size_t eob;              /* Number of bytes of the EOB (End Of Body) that
                               have been received so far */
   unsigned int authmechs;  /* Accepted authentication mechanisms */
-  unsigned int authused;   /* Authentication method used for the connection */
+  unsigned int authused;   /* Auth mechanism used for the connection */
   smtpstate state;         /* Always use smtp.c:state() to change state! */
   struct curl_slist *rcpt; /* Recipient list */
   bool ssldone;            /* Is connect() over SSL done? only relevant in