httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From soc-r...@apache.org
Subject svn commit: r280694 - /httpd/mod_smtpd/trunk/smtp_protocol.c
Date Tue, 13 Sep 2005 22:25:38 GMT
Author: soc-rian
Date: Tue Sep 13 15:25:35 2005
New Revision: 280694

URL: http://svn.apache.org/viewcvs?rev=280694&view=rev
Log:
fixed temporary memory leak

Modified:
    httpd/mod_smtpd/trunk/smtp_protocol.c

Modified: httpd/mod_smtpd/trunk/smtp_protocol.c
URL: http://svn.apache.org/viewcvs/httpd/mod_smtpd/trunk/smtp_protocol.c?rev=280694&r1=280693&r2=280694&view=diff
==============================================================================
--- httpd/mod_smtpd/trunk/smtp_protocol.c (original)
+++ httpd/mod_smtpd/trunk/smtp_protocol.c Tue Sep 13 15:25:35 2005
@@ -189,11 +189,16 @@
     str->protocol_type = SMTPD_PROTOCOL_ESMTP;
     
     if (scr->extensions->nelts) {
-        apr_array_header_t *first  = apr_array_make(str->p, 1, sizeof(char *));
+        apr_pool_t *p;
+        apr_array_header_t *first;
+        
+        apr_pool_create(&p, str->p);
+        first = apr_array_make(p, 1, sizeof(char *));
         (*((char **)apr_array_push(first))) = str->helo;
         apr_array_cat(first, scr->extensions);
         
         smtpd_respond_multiline(scr, 250, first);
+        apr_pool_destroy(p);
     }
     else {
         smtpd_respond_oneline(scr, 250, str->helo);



Mime
View raw message