From 8476d8a6f21f31dfa75bbed86ab956c9397182b3 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Tue, 6 May 2008 08:07:52 -0500 Subject: [PATCH] Samba Shared Repository - branch v3-3-test updated - release-3-2-0pre2-2315-g64d21f3 The branch, v3-3-test has been updated via 64d21f39636019d6a17f84efc6fb9e61e67a235e (commit) from 87383a4605ab99d32fccae7793dc5292b8f3e25b (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-3-test - Log ----------------------------------------------------------------- commit 64d21f39636019d6a17f84efc6fb9e61e67a235e Author: Volker Lendecke Date: Tue May 6 15:06:12 2008 +0200 Fix a memleak in construct_printer_info_7() Also fix a "ignoring asprintf result" warning ----------------------------------------------------------------------- Summary of changes: source/rpc_server/srv_spoolss_nt.c | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) Changeset truncated at 500 lines: --- source/rpc_server/srv_spoolss_nt.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/source/rpc_server/srv_spoolss_nt.c b/source/rpc_server/srv_spoolss_nt.c index da1528f41a8..a8aa3393933 100644 --- a/source/rpc_server/srv_spoolss_nt.c +++ b/source/rpc_server/srv_spoolss_nt.c @@ -4361,10 +4361,13 @@ static bool construct_printer_info_7(Printer_entry *print_hnd, PRINTER_INFO_7 *p struct GUID guid; if (is_printer_published(print_hnd, snum, &guid)) { - asprintf(&guid_str, "{%s}", - smb_uuid_string(talloc_tos(), guid)); + if (asprintf(&guid_str, "{%s}", + smb_uuid_string(talloc_tos(), guid)) == -1) { + return false; + } strupper_m(guid_str); init_unistr(&printer->guid, guid_str); + SAFE_FREE(guid_str); printer->action = SPOOL_DS_PUBLISH; } else { init_unistr(&printer->guid, ""); -- 2.11.4.GIT