svn commit: samba r14304 - in trunk/source/rpc_server: .
jra at samba.org
jra at samba.org
Mon Mar 13 06:52:12 GMT 2006
Author: jra
Date: 2006-03-13 06:52:09 +0000 (Mon, 13 Mar 2006)
New Revision: 14304
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=14304
Log:
Fix coverity #223. In a loop we were forgetting to free
resources on error exit path.
Jeremy.
Modified:
trunk/source/rpc_server/srv_spoolss_nt.c
Changeset:
Modified: trunk/source/rpc_server/srv_spoolss_nt.c
===================================================================
--- trunk/source/rpc_server/srv_spoolss_nt.c 2006-03-13 06:52:03 UTC (rev 14303)
+++ trunk/source/rpc_server/srv_spoolss_nt.c 2006-03-13 06:52:09 UTC (rev 14304)
@@ -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