You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by so...@apache.org on 2005/09/14 00:25:38 UTC
svn commit: r280694 - /httpd/mod_smtpd/trunk/smtp_protocol.c
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);