Patch provided by William A. Rowe Jr. (the mod_ftp author) to fix a
rare crash after serving a file:

--- modules/ftp/ftp_commands.c	2009-09-21 15:09:19.000000000 -0400
+++ modules/ftp/ftp_commands.c	2011-11-30 16:21:38.000000000 -0500
@@ -2171,6 +2171,7 @@
     }
 
 clean_up:
+    ap_lingering_close(cdata);
     ap_destroy_sub_req(rr);
 
     /* Replace the filters and connection */
@@ -2181,7 +2182,6 @@
     r->connection = c;
 
     /* Close the data connection, send confirmation, and return  */
-    ap_lingering_close(cdata);
     fc->datasock = NULL;
     fc->filter_mask = 0;
 
