spoolss: cache_key handle allocation failures early
commita65e22c6bdf32c2bb014a2ed52794590a49dda34
authorDavid Disseldorp <ddiss@samba.org>
Wed, 15 Apr 2015 13:48:06 +0000 (15 15:48 +0200)
committerGünther Deschner <gd@samba.org>
Wed, 15 Apr 2015 16:55:50 +0000 (15 18:55 +0200)
tree3c66833dc8ac8b9165d74a3678e5c6dda7a8cecf
parente8951eb9b837c05bd3c53de9368702c5de644ada
spoolss: cache_key handle allocation failures early

On cache_key allocation failure, set_printer_hnd_name() currently
stumbles through the rest of the function, and includes extra logic to
handle a NULL key later on.
Handling the allocation failure early makes sense, and also allows for
the NULL key checks to be removed.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Wed Apr 15 18:55:50 CEST 2015 on sn-devel-104
source3/rpc_server/spoolss/srv_spoolss_nt.c