summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2006-06-19 21:42:07 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:18:49 -0500
commit1b64f06048736ac039beb1a33def67f9a665bcf2 (patch)
tree21fb83ea27ff4a76651579ccc5227f76a3117aca /source3
parentd5b6dedfdd1acb9a2340a04865308c7c3c975ffd (diff)
downloadsamba-1b64f06048736ac039beb1a33def67f9a665bcf2.tar.gz
samba-1b64f06048736ac039beb1a33def67f9a665bcf2.tar.bz2
samba-1b64f06048736ac039beb1a33def67f9a665bcf2.zip
r16367: Missed one, Klocwork #915.
Jeremy. (This used to be commit b581fee9824712b9385e9975739a8ddbb297bca8)
Diffstat (limited to 'source3')
-rw-r--r--source3/printing/nt_printing.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c
index 6b9a46070b..6a7fd4d398 100644
--- a/source3/printing/nt_printing.c
+++ b/source3/printing/nt_printing.c
@@ -3112,6 +3112,10 @@ static WERROR nt_printer_unpublish_ads(ADS_STRUCT *ads,
if (ADS_ERR_OK(ads_rc) && ads_count_replies(ads, res)) {
prt_dn = ads_get_dn(ads, res);
+ if (!prt_dn) {
+ ads_msgfree(ads, res);
+ return WERR_NOMEM;
+ }
ads_rc = ads_del_dn(ads, prt_dn);
ads_memfree(ads, prt_dn);
}