mirror of
https://github.com/samba-team/samba.git
synced 2025-02-03 13:47:25 +03:00
r14303: Fix coverity #223. In a loop we were forgetting to free
resources on error exit path. Jeremy. (This used to be commit f71aa3ab8fdfd08c1bec57b6506ead7c4af7299d)
This commit is contained in:
parent
ad838bf65e
commit
d72bb5627c
@ -6717,8 +6717,10 @@ static WERROR enumprinterdrivers_level1(fstring servername, fstring architecture
|
||||
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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user