httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject DO NOT REPLY [Bug 52976] New: Gratuitous string-duplication in module-configuration (apr_pstrdup)
Date Fri, 23 Mar 2012 01:09:12 GMT

             Bug #: 52976
           Summary: Gratuitous string-duplication in module-configuration
           Product: Apache httpd-2
           Version: 2.2.22
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: minor
          Priority: P2
         Component: mod_ftp
    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:
------- You are receiving this mail because: -------
You are the assignee for the bug.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message