git.samba.org
/
gd
/
samba
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8e274e8
)
r16595: Klocwork #2067. Fix possible memleak on error exit.
author
Jeremy Allison
<jra@samba.org>
Wed, 28 Jun 2006 01:56:41 +0000
(
01:56
+0000)
committer
Gerald (Jerry) Carter
<jerry@samba.org>
Wed, 10 Oct 2007 16:19:02 +0000
(11:19 -0500)
Jeremy.
(This used to be commit
1d21a3dec9ea061ce900ad1223f7c2a43c064600
)
source3/lib/util_str.c
patch
|
blob
|
history
diff --git
a/source3/lib/util_str.c
b/source3/lib/util_str.c
index 8e0f2765ebb30c75380e61c580139ce2ce2fa5b7..938fb0f47b02121decdc696f23972768383bd792 100644
(file)
--- a/
source3/lib/util_str.c
+++ b/
source3/lib/util_str.c
@@
-2402,6
+2402,9
@@
void sprintf_append(TALLOC_CTX *mem_ctx, char **string, ssize_t *len,
error:
*len = -1;
+ if (mem_ctx == NULL) {
+ SAFE_FREE(*string);
+ }
*string = NULL;
}