printing: Free talloc_stackframe() on all exit paths
authorAndrew Bartlett <abartlet@samba.org>
Fri, 18 Jan 2013 02:39:13 +0000 (13:39 +1100)
committerStefan Metzmacher <metze@samba.org>
Sat, 19 Jan 2013 08:42:02 +0000 (09:42 +0100)
Reviewed-by: Stefan Metzmacher <metze@samba.org>
source3/printing/nt_printing.c

index 7bf2c5530d24e1b08f36db396f0ceacb44156d64..1539b89a0e81b2bae7f8fc79c9b24aaed67eb243 100644 (file)
@@ -85,11 +85,13 @@ static bool print_driver_directories_init(void)
        if (service < 0) {
                /* We don't have a print$ share */
                DEBUG(5, ("No print$ share has been configured.\n"));
+               talloc_free(mem_ctx);
                return true;
        }
 
        driver_path = lp_pathname(mem_ctx, service);
        if (driver_path == NULL) {
+               talloc_free(mem_ctx);
                return false;
        }