Commit 18af6036 authored by Colm MacCarthaigh's avatar Colm MacCarthaigh
Browse files

Fix near-identical potential NULL pointer dereferences, as found by

Jorton and corrected in r514915


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@514954 13f79535-47bb-0310-9956-ffa450edef68
parent 31428fc7
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -259,12 +259,12 @@ int main(int argc, const char * const argv[])
        status = apr_getnameinfo(&hostname, ip, 0) != APR_SUCCESS;
        if (status || hostname == NULL) {
            /* Could not perform a reverse lookup */
            *space = ' ';
            if (space) *space = ' ';
            apr_file_puts(line, outfile);
            noreverse++;

            /* Add to cache */
            *space = '\0';
            if (space) *space = '\0';
            apr_hash_set(cache, line, APR_HASH_KEY_STRING,
                         apr_pstrdup(pool, line));
            continue;
@@ -280,12 +280,12 @@ int main(int argc, const char * const argv[])
            if (status == APR_SUCCESS ||
                memcmp(ipdouble->ipaddr_ptr, ip->ipaddr_ptr, ip->ipaddr_len)) {
                /* Double-lookup failed  */
                *space = ' ';
                if (space) *space = ' ';
                apr_file_puts(line, outfile);
                doublefailed++;

                /* Add to cache */
                *space = '\0';
                if (space) *space = '\0';
                apr_hash_set(cache, line, APR_HASH_KEY_STRING,
                             apr_pstrdup(pool, line));
                continue;