diff options
author | Volker Lendecke <vl@samba.org> | 2009-06-15 07:45:47 +0200 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2009-06-15 07:48:50 +0200 |
commit | 0c3580c5de63265c54924a5f171e858a0bfb2a79 (patch) | |
tree | 7a6b8362dbcf96857888fb6446ecdfe175325772 | |
parent | b7062657864d979e37f541189a164cae3f700a31 (diff) | |
download | samba-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.c | 5 |
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) { |