svn commit: r217505 - head/lib/libfetch

Dag-Erling Smorgrav des at FreeBSD.org
Mon Jan 17 17:25:47 UTC 2011


Author: des
Date: Mon Jan 17 17:25:46 2011
New Revision: 217505
URL: http://svn.freebsd.org/changeset/base/217505

Log:
  Fix a bug related to connection caching which could cause a crash after
  a STAT command.
  
  PR:		kern/153748 (different patch)
  Submitted by:	Mark Johnston <markjdb at gmail.com>
  MFC after:	2 weeks

Modified:
  head/lib/libfetch/ftp.c

Modified: head/lib/libfetch/ftp.c
==============================================================================
--- head/lib/libfetch/ftp.c	Mon Jan 17 17:23:59 2011	(r217504)
+++ head/lib/libfetch/ftp.c	Mon Jan 17 17:25:46 2011	(r217505)
@@ -1132,6 +1132,7 @@ ftp_request(struct url *url, const char 
 
 	/* just a stat */
 	if (strcmp(op, "STAT") == 0) {
+		--conn->ref;
 		ftp_disconnect(conn);
 		return (FILE *)1; /* bogus return value */
 	}


More information about the svn-src-head mailing list