summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2004-05-07 13:45:41 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:51:28 -0500
commit72d124af9e63755782ea3c4366a7c295d25ff683 (patch)
treed46813a9aead0e11252da2f9f5692490408125e4
parent22cf8924a9b799bc7c833ac8a6caabbee381d6cb (diff)
downloadsamba-72d124af9e63755782ea3c4366a7c295d25ff683.tar.gz
samba-72d124af9e63755782ea3c4366a7c295d25ff683.tar.bz2
samba-72d124af9e63755782ea3c4366a7c295d25ff683.zip
r551: BUG 1293: fix double free in printer publishing code
(This used to be commit f9a371f33b89852e42004469cb60efec973067bd)
-rw-r--r--source3/printing/nt_printing.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c
index fd7968f45d..0670b2543e 100644
--- a/source3/printing/nt_printing.c
+++ b/source3/printing/nt_printing.c
@@ -2718,14 +2718,13 @@ static WERROR publish_it(NT_PRINTER_INFO_LEVEL *printer)
/* retreive the guid and store it locally */
if (ADS_ERR_OK(ads_search_dn(ads, &res, prt_dn, attrs))) {
- ads_memfree(ads, prt_dn);
ads_pull_guid(ads, res, &guid);
ads_msgfree(ads, res);
store_printer_guid(printer->info_2, guid);
win_rc = mod_a_printer(*printer, 2);
}
- safe_free(prt_dn);
+ SAFE_FREE(prt_dn);
ads_destroy(&ads);
return WERR_OK;