]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
Samba Shared Repository - branch v3-3-test updated - release-3-2-0pre2-2315-g64d21f3
authorVolker Lendecke <vlendec@samba.org>
Tue, 6 May 2008 13:07:52 +0000 (08:07 -0500)
committerJeremy Allison <jra@samba.org>
Tue, 6 May 2008 23:38:19 +0000 (16:38 -0700)
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 <vl@samba.org>
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

index da1528f41a8af2773ca98aa442a6db248462b06a..a8aa33939338356d0aee61250f3cd5d82d6e1793 100644 (file)
@@ -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, "");