[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

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

From: Joel Rosdahl <joel_at_rosdahl.net>
Date: 2002-02-12 21:41:56 CET

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 <joel@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
Received on Sat Oct 21 14:37:07 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.