Return-Path: X-Original-To: apmail-httpd-bugs-archive@www.apache.org Delivered-To: apmail-httpd-bugs-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B86039A69 for ; Fri, 23 Mar 2012 01:09:34 +0000 (UTC) Received: (qmail 96675 invoked by uid 500); 23 Mar 2012 01:09:34 -0000 Delivered-To: apmail-httpd-bugs-archive@httpd.apache.org Received: (qmail 96624 invoked by uid 500); 23 Mar 2012 01:09:34 -0000 Mailing-List: contact bugs-help@httpd.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: Reply-To: "Apache HTTPD Bugs Notification List" List-Id: Delivered-To: mailing list bugs@httpd.apache.org Received: (qmail 96617 invoked by uid 99); 23 Mar 2012 01:09:34 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 23 Mar 2012 01:09:34 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.115] (HELO eir.zones.apache.org) (140.211.11.115) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 23 Mar 2012 01:09:32 +0000 Received: by eir.zones.apache.org (Postfix, from userid 80) id BDEA93489; Fri, 23 Mar 2012 01:09:12 +0000 (UTC) From: bugzilla@apache.org To: bugs@httpd.apache.org Subject: DO NOT REPLY [Bug 52976] New: Gratuitous string-duplication in module-configuration (apr_pstrdup) Date: Fri, 23 Mar 2012 01:09:12 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Apache httpd-2 X-Bugzilla-Component: mod_ftp X-Bugzilla-Keywords: X-Bugzilla-Severity: minor X-Bugzilla-Who: mi+apache@aldan.algebra.com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: bugs@httpd.apache.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: https://issues.apache.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org https://issues.apache.org/bugzilla/show_bug.cgi?id=52976 Bug #: 52976 Summary: Gratuitous string-duplication in module-configuration (apr_pstrdup) Product: Apache httpd-2 Version: 2.2.22 Platform: PC OS/Version: All Status: NEW Severity: minor Priority: P2 Component: mod_ftp AssignedTo: bugs@httpd.apache.org ReportedBy: mi+apache@aldan.algebra.com Classification: Unclassified Every string passed to the configuration-parsing functions in mod_ftp.c is duplicated (via apr_pstrdup) for the ftp_server_config-structure, instead of simply recording a direct reference to it (as const char *). Such duplication seems redundant. Is there anything wrong with the following replacement, for example: - fsc->homedir = apr_pstrdup(cmd->pool, dir); + fsc->homedir = dir; Does not the configuration-parsing pool live forever? My own little module here treats such strings the way I propose -- it never has a crash, and valgrind has no issues with it whatsoever... -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org For additional commands, e-mail: bugs-help@httpd.apache.org