You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Joel Rosdahl <jo...@rosdahl.net> on 2002/02/12 20:41:56 UTC

[PATCH] Don't free URI used in error message too early

Hi,

The hostname in an error message from the RA layer becomes "(null)":

| % svn update
| 
| svn_error: #21080 : <RA layer failed hostname lookup>
|   Hostname not found: (null)

Patch:

* subversion/libsvn_ra_dav/session.c (svn_ra_dav__open): Don't free
URI used in error message too early.

Index: ./subversion/libsvn_ra_dav/session.c
===================================================================
--- ./subversion/libsvn_ra_dav/session.c
+++ ./subversion/libsvn_ra_dav/session.c	Mon Feb 11 21:54:36 2002
@@ -172,9 +172,11 @@
 
   if (ne_session_server(sess, uri.host, uri.port))
     {
+      svn_error_t *err =
+        svn_error_createf(SVN_ERR_RA_HOSTNAME_LOOKUP, 0, NULL, pool,
+                          "Hostname not found: %s", uri.host);
       uri_free(&uri);
-      return svn_error_createf(SVN_ERR_RA_HOSTNAME_LOOKUP, 0, NULL, pool,
-                               "Hostname not found: %s", uri.host);
+      return err;
     }
 
   ne_session_server(sess2, uri.host, uri.port);

-- 
Joel Rosdahl <jo...@rosdahl.net>   (PGP and GPG keys available)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH] Don't free URI used in error message too early

Posted by cm...@collab.net.
Joel Rosdahl <jo...@rosdahl.net> writes:

> Hi,
> 
> The hostname in an error message from the RA layer becomes "(null)":
> 
> | % svn update
> | 
> | svn_error: #21080 : <RA layer failed hostname lookup>
> |   Hostname not found: (null)
> 
> Patch:
> 
> * subversion/libsvn_ra_dav/session.c (svn_ra_dav__open): Don't free
> URI used in error message too early.

Committed.  Thanks, Joel.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org