svn commit: samba r14303 - in branches/SAMBA_3_0/source/rpc_server:
.
jra at samba.org
jra at samba.org
Mon Mar 13 06:52:08 GMT 2006
Author: jra
Date: 2006-03-13 06:52:03 +0000 (Mon, 13 Mar 2006)
New Revision: 14303
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=14303
Log:
Fix coverity #223. 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:50:40 UTC (rev 14302)
+++ branches/SAMBA_3_0/source/rpc_server/srv_spoolss_nt.c 2006-03-13 06:52:03 UTC (rev 14303)
@@ -6717,8 +6717,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_1);
return WERR_NOMEM;
+ }
if(ndrivers != 0) {
if((driver_info_1=SMB_REALLOC_ARRAY(driver_info_1, DRIVER_INFO_1, *returned+ndrivers )) == NULL) {
More information about the samba-cvs
mailing list