You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Max Okumoto <ok...@ucsd.edu> on 2001/12/03 10:49:51 UTC

mem leaks in svn_ra_dav__get_baseline_info()

Found a leak in svn_ra_dav__get_baseline_info()

When the 'url' is parsed with uri_parse(), the
variable 'parsed_url' has strings allocated via ne_strdup()

The strings are lost when the function returns.

 			Max Okumoto

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

Re: mem leaks in svn_ra_dav__get_baseline_info()

Posted by Karl Fogel <kf...@newton.ch.collab.net>.
Great.  Max, I know this may seem trivial, but it's *so* helpful if
you can include filenames, line numbers, and excerpts.  Then our
editors can help us get to the problem _very_ quickly.

(Not to mention log message, patch if you can :-) )

-Karl

Max Okumoto <ok...@ucsd.edu> writes:
> Found a leak in svn_ra_dav__get_baseline_info()
> 
> When the 'url' is parsed with uri_parse(), the
> variable 'parsed_url' has strings allocated via ne_strdup()
> 
> The strings are lost when the function returns.
> 
>  			Max Okumoto
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: dev-help@subversion.tigris.org

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

Re: mem leaks in svn_ra_dav__get_baseline_info()

Posted by Max Okumoto <ok...@ucsd.edu>.
> Found a leak in svn_ra_dav__get_baseline_info()
> 
> When the 'url' is parsed with uri_parse(), the
> variable 'parsed_url' has strings allocated via ne_strdup()
> 
> The strings are lost when the function returns.

* subversion/libsvn_ra_dav/props.c
  Free parsed uri strings as soon as possible.

Index: subversion/libsvn_ra_dav/props.c
===================================================================
--- subversion/libsvn_ra_dav/.svn/text-base/props.c.svn-base	Sun Dec  2 13:34:41 2001
+++ subversion/libsvn_ra_dav/props.c	Tue Dec  4 04:05:41 2001
@@ -497,6 +500,7 @@
      ### and omit relpath when bc_relative is NULL. */
   SVN_ERR( svn_ra_dav__get_props_resource(&rsrc, sess, parsed_url.path,
                                           NULL, starting_props, pool) );
+  uri_free(&parsed_url);
 
   if (is_dir != NULL)
     *is_dir = rsrc->is_collection;

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