1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-08 21:18:16 +03:00

r23758: Fix Coverity id 385

(This used to be commit 4d9f627cc8)
This commit is contained in:
Volker Lendecke 2007-07-09 08:04:43 +00:00 committed by Gerald (Jerry) Carter
parent 161ebbc17a
commit 65f7a9d084

View File

@ -7490,8 +7490,13 @@ WERROR enumports_hook( int *count, char ***lines )
/* if no hook then just fill in the default port */
if ( !*cmd ) {
qlines = SMB_MALLOC_ARRAY( char*, 2 );
qlines[0] = SMB_STRDUP( SAMBA_PRINTER_PORT_NAME );
if (!(qlines = SMB_MALLOC_ARRAY( char*, 2 ))) {
return WERR_NOMEM;
}
if (!(qlines[0] = SMB_STRDUP( SAMBA_PRINTER_PORT_NAME ))) {
SAFE_FREE(qlines);
return WERR_NOMEM;
}
qlines[1] = NULL;
numlines = 1;
}