diff options
author | Volker Lendecke <vlendec@samba.org> | 2007-07-09 08:04:43 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:23:53 -0500 |
commit | 65f7a9d084ec455a0c8a504c978e49b56e37af32 (patch) | |
tree | b31ba5e313436af3c98cc5c513109d100f3aa044 /source3 | |
parent | 161ebbc17a8607dca665367334ef7af6ecf07418 (diff) | |
download | samba-65f7a9d084ec455a0c8a504c978e49b56e37af32.tar.gz samba-65f7a9d084ec455a0c8a504c978e49b56e37af32.tar.bz2 samba-65f7a9d084ec455a0c8a504c978e49b56e37af32.zip |
r23758: Fix Coverity id 385
(This used to be commit 4d9f627cc8081307da3f84f784602533bd20c1e6)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/rpc_server/srv_spoolss_nt.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c index 2047e13df3..464ca36f3c 100644 --- a/source3/rpc_server/srv_spoolss_nt.c +++ b/source3/rpc_server/srv_spoolss_nt.c @@ -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; } |