git.samba.org
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c45e089
)
util:str_sub: talloc_free on error
author
Douglas Bagnall
<douglas.bagnall@catalyst.net.nz>
Wed, 10 Mar 2021 09:13:48 +0000
(22:13 +1300)
committer
Jeremy Allison
<jra@samba.org>
Thu, 11 Mar 2021 21:42:43 +0000
(21:42 +0000)
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Jeremy Allison <jra@samba.org>
lib/util/substitute.c
patch
|
blob
|
history
diff --git
a/lib/util/substitute.c
b/lib/util/substitute.c
index 3ca53d912c4cd511f9179c06b4e084b86d27e998..b7b5588da863faa960200d9f9fd32e2120462b46 100644
(file)
--- a/
lib/util/substitute.c
+++ b/
lib/util/substitute.c
@@
-194,6
+194,7
@@
char *talloc_string_sub2(TALLOC_CTX *mem_ctx, const char *src,
in = talloc_strdup(mem_ctx, insert);
if (!in) {
DEBUG(0, ("talloc_string_sub2: ENOMEM\n"));
+ talloc_free(string);
return NULL;
}
ls = (ssize_t)strlen(s);