svn commit: samba r16586 - in trunk/source/client: .

jra at samba.org jra at samba.org
Wed Jun 28 01:11:15 GMT 2006


Author: jra
Date: 2006-06-28 01:11:12 +0000 (Wed, 28 Jun 2006)
New Revision: 16586

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=16586

Log:
Fix Klocwork #1987. Memleak on reusing x_dbf.
Jeremy.

Modified:
   trunk/source/client/client.c
   trunk/source/client/smbctool.c


Changeset:
Modified: trunk/source/client/client.c
===================================================================
--- trunk/source/client/client.c	2006-06-28 01:00:48 UTC (rev 16585)
+++ trunk/source/client/client.c	2006-06-28 01:11:12 UTC (rev 16586)
@@ -3464,6 +3464,9 @@
 			}
 			break;
 		case 'E':
+			if (dbf) {
+				x_fclose(dbf);
+			}
 			dbf = x_stderr;
 			display_set_stderr();
 			break;

Modified: trunk/source/client/smbctool.c
===================================================================
--- trunk/source/client/smbctool.c	2006-06-28 01:00:48 UTC (rev 16585)
+++ trunk/source/client/smbctool.c	2006-06-28 01:11:12 UTC (rev 16586)
@@ -3605,6 +3605,9 @@
 			}
 			break;
 		case 'E':
+			if (dbf) {
+				x_fclose(dbf);
+			}
 			dbf = x_stderr;
 			display_set_stderr();
 			break;



More information about the samba-cvs mailing list