memory leak in print_rsync_version

Ming Zhang blackmagic02881 at gmail.com
Tue Dec 11 17:03:16 GMT 2007


Hi All

A tiny memory leak bug.


Index: options.c
===================================================================
RCS file: /cvsroot/rsync/options.c,v
retrieving revision 1.419
diff -u -p -r1.419 options.c
--- options.c   8 Nov 2007 00:06:48 -0000       1.419
+++ options.c   11 Dec 2007 17:01:29 -0000
@@ -283,6 +283,10 @@ static void print_rsync_version(enum log
        rprintf(f,"rsync comes with ABSOLUTELY NO WARRANTY.  This is free software, and you\n");
        rprintf(f,"are welcome to redistribute it under certain conditions.  See the GNU\n");
        rprintf(f,"General Public Licence for details.\n");
+
+#if SUBPROTOCOL_VERSION != 0
+       free(subprotocol);
+#endif
 }
 

-- 
Ming Zhang


@#$%^ purging memory... (*!%
http://blackmagic02881.wordpress.com/
http://www.linkedin.com/in/blackmagic02881
--------------------------------------------



More information about the rsync mailing list