1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

net: Fix Coverity ID 241039 Unchecked return value

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>

Autobuild-User(master): Uri Simchoni <uri@samba.org>
Autobuild-Date(master): Wed Dec 23 17:17:53 CET 2015 on sn-devel-144
This commit is contained in:
Volker Lendecke 2015-12-23 11:32:04 +01:00 committed by Uri Simchoni
parent 431cf20160
commit f33224dbcf

View File

@ -1910,6 +1910,7 @@ static int net_ads_printer_publish(struct net_context *c, int argc, const char *
char *prt_dn, *srv_dn, **srv_cn;
char *srv_cn_escaped = NULL, *printername_escaped = NULL;
LDAPMessage *res = NULL;
bool ok;
if (argc < 1 || c->display_usage) {
d_printf("%s\n%s",
@ -1937,7 +1938,14 @@ static int net_ads_printer_publish(struct net_context *c, int argc, const char *
/* Get printer data from SPOOLSS */
resolve_name(servername, &server_ss, 0x20, false);
ok = resolve_name(servername, &server_ss, 0x20, false);
if (!ok) {
d_fprintf(stderr, _("Could not find server %s\n"),
servername);
ads_destroy(&ads);
talloc_destroy(mem_ctx);
return -1;
}
nt_status = cli_full_connection(&cli, lp_netbios_name(), servername,
&server_ss, 0,