svn commit: samba r14302 - in trunk/source/rpc_server: .
jra at samba.org
jra at samba.org
Mon Mar 13 06:50:42 GMT 2006
Author: jra
Date: 2006-03-13 06:50:40 +0000 (Mon, 13 Mar 2006)
New Revision: 14302
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=14302
Log:
Fix coverity #224. 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:50:33 UTC (rev 14301)
+++ trunk/source/rpc_server/srv_spoolss_nt.c 2006-03-13 06:50:40 UTC (rev 14302)
@@ -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