svn commit: samba r14301 - in branches/SAMBA_3_0/source/rpc_server:
.
jra at samba.org
jra at samba.org
Mon Mar 13 06:50:36 GMT 2006
Author: jra
Date: 2006-03-13 06:50:33 +0000 (Mon, 13 Mar 2006)
New Revision: 14301
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=14301
Log:
Fix coverity #224. In a loop we were forgetting to free
resources on error exit path.
Jeremy.
Modified:
branches/SAMBA_3_0/source/rpc_server/srv_spoolss_nt.c
Changeset:
Modified: branches/SAMBA_3_0/source/rpc_server/srv_spoolss_nt.c
===================================================================
--- branches/SAMBA_3_0/source/rpc_server/srv_spoolss_nt.c 2006-03-13 06:48:48 UTC (rev 14300)
+++ branches/SAMBA_3_0/source/rpc_server/srv_spoolss_nt.c 2006-03-13 06:50:33 UTC (rev 14301)
@@ -6799,8 +6799,10 @@
ndrivers=get_ntdrivers(&list, architecture, version);
DEBUGADD(4,("we have:[%d] drivers in environment [%s] and version [%d]\n", ndrivers, architecture, version));
- if(ndrivers == -1)
+ if(ndrivers == -1) {
+ SAFE_FREE(driver_info_2);
return WERR_NOMEM;
+ }
if(ndrivers != 0) {
if((driver_info_2=SMB_REALLOC_ARRAY(driver_info_2, DRIVER_INFO_2, *returned+ndrivers )) == NULL) {
More information about the samba-cvs
mailing list