[ros-diffs] [janderwald] 37084: - Fix a memory leak (CID 625)

janderwald at svn.reactos.org janderwald at svn.reactos.org
Thu Oct 30 09:35:15 CET 2008


Author: janderwald
Date: Thu Oct 30 03:35:15 2008
New Revision: 37084

URL: http://svn.reactos.org/svn/reactos?rev=37084&view=rev
Log:
- Fix a memory leak (CID 625)

Modified:
    trunk/reactos/base/applications/network/finger/finger.c

Modified: trunk/reactos/base/applications/network/finger/finger.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/network/finger/finger.c?rev=37084&r1=37083&r2=37084&view=diff
==============================================================================
--- trunk/reactos/base/applications/network/finger/finger.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/network/finger/finger.c [iso-8859-1] Thu Oct 30 03:35:15 2008
@@ -122,7 +122,7 @@
 static void
 userlist(int argc, char **argv)
 {
-	int *used;
+	int *used = NULL;
 	char **ap, **nargv, **np, **p;
 	WORD wVersionRequested;
 	WSADATA wsaData;
@@ -166,6 +166,8 @@
 
 	/* Bring down winsock */
 	WSACleanup();
+	free(nargv);
+	free(used);
 	exit(0);
 }
 



More information about the Ros-diffs mailing list