1
0
mirror of https://github.com/samba-team/samba.git synced 2025-07-30 19:42:05 +03:00

r15569: Fix Coverity bug # 287. Jerry, can you check if WERR_NOMEM is a correct error

code here?

Thanks,

Volker
(This used to be commit 5787bd0ee9)
This commit is contained in:
Volker Lendecke
2006-05-13 17:17:07 +00:00
committed by Gerald (Jerry) Carter
parent f390936c5b
commit 5895967601

View File

@ -3020,8 +3020,19 @@ static WERROR nt_printer_publish_ads(ADS_STRUCT *ads,
/* build the ads mods */
ctx = talloc_init("nt_printer_publish_ads");
if (ctx == NULL) {
SAFE_FREE(prt_dn);
return WERR_NOMEM;
}
mods = ads_init_mods(ctx);
if (mods == NULL) {
SAFE_FREE(prt_dn);
talloc_destroy(ctx);
return WERR_NOMEM;
}
get_local_printer_publishing_data(ctx, &mods, printer->info_2->data);
ads_mod_str(ctx, &mods, SPOOL_REG_PRINTERNAME,
printer->info_2->sharename);