mirror of
https://github.com/samba-team/samba.git
synced 2025-01-27 14:04:05 +03:00
r14286: Similar clarifiction fix for coverity #102.
Jeremy. (This used to be commit f458596b0edd958321c5d4061f034846348a3fe6)
This commit is contained in:
parent
e4600491cf
commit
acc651a31b
@ -7288,8 +7288,8 @@ static WERROR enumports_level_1(RPC_BUFFER *buffer, uint32 offered, uint32 *need
|
||||
PORT_INFO_1 *ports=NULL;
|
||||
int i=0;
|
||||
WERROR result = WERR_OK;
|
||||
char **qlines;
|
||||
int numlines;
|
||||
char **qlines = NULL;
|
||||
int numlines = 0;
|
||||
|
||||
result = enumports_hook( &numlines, &qlines );
|
||||
if (!W_ERROR_IS_OK(result)) {
|
||||
@ -7354,12 +7354,14 @@ static WERROR enumports_level_2(RPC_BUFFER *buffer, uint32 offered, uint32 *need
|
||||
PORT_INFO_2 *ports=NULL;
|
||||
int i=0;
|
||||
WERROR result = WERR_OK;
|
||||
char **qlines;
|
||||
int numlines;
|
||||
char **qlines = NULL;
|
||||
int numlines = 0;
|
||||
|
||||
if ( !W_ERROR_IS_OK(result = enumports_hook( &numlines, &qlines )) )
|
||||
result = enumports_hook( &numlines, &qlines );
|
||||
if ( !W_ERROR_IS_OK(result)) {
|
||||
file_lines_free(qlines);
|
||||
return result;
|
||||
|
||||
}
|
||||
|
||||
if(numlines) {
|
||||
if((ports=SMB_MALLOC_ARRAY( PORT_INFO_2, numlines)) == NULL) {
|
||||
@ -7371,9 +7373,9 @@ static WERROR enumports_level_2(RPC_BUFFER *buffer, uint32 offered, uint32 *need
|
||||
DEBUG(6,("Filling port number [%d] with port [%s]\n", i, qlines[i]));
|
||||
fill_port_2(&(ports[i]), qlines[i]);
|
||||
}
|
||||
}
|
||||
|
||||
file_lines_free(qlines);
|
||||
}
|
||||
|
||||
*returned = numlines;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user