summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2009-06-15 07:45:47 +0200
committerVolker Lendecke <vl@samba.org>2009-06-15 07:48:50 +0200
commit0c3580c5de63265c54924a5f171e858a0bfb2a79 (patch)
tree7a6b8362dbcf96857888fb6446ecdfe175325772
parentb7062657864d979e37f541189a164cae3f700a31 (diff)
downloadsamba-0c3580c5de63265c54924a5f171e858a0bfb2a79.tar.gz
samba-0c3580c5de63265c54924a5f171e858a0bfb2a79.tar.bz2
samba-0c3580c5de63265c54924a5f171e858a0bfb2a79.zip
Do a correct TALLOC_FREE in an error case
-rw-r--r--source3/printing/nt_printing.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c
index 74aaf0256c..f496ae5edd 100644
--- a/source3/printing/nt_printing.c
+++ b/source3/printing/nt_printing.c
@@ -1823,7 +1823,10 @@ static WERROR move_driver_file_to_download_area(TALLOC_CTX *mem_ctx,
new_name = talloc_asprintf(mem_ctx, "%s/%d/%s",
short_architecture, driver_version, driver_file);
- W_ERROR_HAVE_NO_MEMORY(new_name);
+ if (new_name == NULL) {
+ TALLOC_FREE(old_name);
+ return WERR_NOMEM;
+ }
if (version != -1 && (version = file_version_is_newer(conn, old_name, new_name)) > 0) {