git.samba.org
/
nivanova
/
samba-autobuild
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b706265
)
Do a correct TALLOC_FREE in an error case
author
Volker Lendecke
<vl@samba.org>
Mon, 15 Jun 2009 05:45:47 +0000
(07:45 +0200)
committer
Volker Lendecke
<vl@samba.org>
Mon, 15 Jun 2009 05:48:50 +0000
(07:48 +0200)
source3/printing/nt_printing.c
patch
|
blob
|
history
diff --git
a/source3/printing/nt_printing.c
b/source3/printing/nt_printing.c
index 74aaf0256c3ec6a668213e5e50066d2f1d1a44eb..f496ae5edd3df31362b1ae3b79cb74f723389253 100644
(file)
--- 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) {