svn commit: samba r23555 - in branches: SAMBA_3_0/source/rpcclient SAMBA_3_0_26/source/rpcclient

jra at samba.org jra at samba.org
Wed Jun 20 18:05:49 GMT 2007


Author: jra
Date: 2007-06-20 18:05:48 +0000 (Wed, 20 Jun 2007)
New Revision: 23555

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

Log:
Fix some uninitialiazed variable uses.
Jeremy

Modified:
   branches/SAMBA_3_0/source/rpcclient/cmd_echo.c
   branches/SAMBA_3_0_26/source/rpcclient/cmd_dfs.c
   branches/SAMBA_3_0_26/source/rpcclient/cmd_echo.c


Changeset:
Modified: branches/SAMBA_3_0/source/rpcclient/cmd_echo.c
===================================================================
--- branches/SAMBA_3_0/source/rpcclient/cmd_echo.c	2007-06-20 17:38:42 UTC (rev 23554)
+++ branches/SAMBA_3_0/source/rpcclient/cmd_echo.c	2007-06-20 18:05:48 UTC (rev 23555)
@@ -63,12 +63,14 @@
 	if ( (in_data = (uint8_t*)SMB_MALLOC(size)) == NULL ) {
 		printf("Failure to allocate buff of %d bytes\n",
 		       size);
-		goto done;		
+		result = NT_STATUS_NO_MEMORY;
+		goto done;
 	}
 	if ( (out_data = (uint8_t*)SMB_MALLOC(size)) == NULL ) {
 		printf("Failure to allocate buff of %d bytes\n",
 		       size);
-		goto done;		
+		result = NT_STATUS_NO_MEMORY;
+		goto done;
 	}
 
 	for (i = 0; i < size; i++)
@@ -111,6 +113,7 @@
 	if ( (out_data = (uint8_t*)SMB_MALLOC(size)) == NULL ) {
 		printf("Failure to allocate buff of %d bytes\n",
 		       size);
+		result = NT_STATUS_NO_MEMORY;
 		goto done;		
 	}
 	
@@ -148,6 +151,7 @@
 	if ( (in_data = (uint8_t*)SMB_MALLOC(size)) == NULL ) {
 		printf("Failure to allocate buff of %d bytes\n",
 		       size);
+		result = NT_STATUS_NO_MEMORY;
 		goto done;		
 	}
 

Modified: branches/SAMBA_3_0_26/source/rpcclient/cmd_dfs.c
===================================================================
--- branches/SAMBA_3_0_26/source/rpcclient/cmd_dfs.c	2007-06-20 17:38:42 UTC (rev 23554)
+++ branches/SAMBA_3_0_26/source/rpcclient/cmd_dfs.c	2007-06-20 18:05:48 UTC (rev 23555)
@@ -36,7 +36,7 @@
 		return NT_STATUS_OK;
 	}
 
-	rpccli_dfs_GetManagerVersion(cli, mem_ctx, &dfs_exists);
+	result = rpccli_dfs_GetManagerVersion(cli, mem_ctx, &dfs_exists);
 
 	printf("dfs is %spresent\n", dfs_exists ? "" : "not ");
 

Modified: branches/SAMBA_3_0_26/source/rpcclient/cmd_echo.c
===================================================================
--- branches/SAMBA_3_0_26/source/rpcclient/cmd_echo.c	2007-06-20 17:38:42 UTC (rev 23554)
+++ branches/SAMBA_3_0_26/source/rpcclient/cmd_echo.c	2007-06-20 18:05:48 UTC (rev 23555)
@@ -63,12 +63,14 @@
 	if ( (in_data = (uint8_t*)SMB_MALLOC(size)) == NULL ) {
 		printf("Failure to allocate buff of %d bytes\n",
 		       size);
-		goto done;		
+		result = NT_STATUS_NO_MEMORY;
+		goto done;
 	}
 	if ( (out_data = (uint8_t*)SMB_MALLOC(size)) == NULL ) {
 		printf("Failure to allocate buff of %d bytes\n",
 		       size);
-		goto done;		
+		result = NT_STATUS_NO_MEMORY;
+		goto done;
 	}
 
 	for (i = 0; i < size; i++)
@@ -111,6 +113,7 @@
 	if ( (out_data = (uint8_t*)SMB_MALLOC(size)) == NULL ) {
 		printf("Failure to allocate buff of %d bytes\n",
 		       size);
+		result = NT_STATUS_NO_MEMORY;
 		goto done;		
 	}
 	
@@ -148,6 +151,7 @@
 	if ( (in_data = (uint8_t*)SMB_MALLOC(size)) == NULL ) {
 		printf("Failure to allocate buff of %d bytes\n",
 		       size);
+		result = NT_STATUS_NO_MEMORY;
 		goto done;		
 	}
 



More information about the samba-cvs mailing list