summaryrefslogtreecommitdiff
path: root/source4/lib
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib')
-rw-r--r--source4/lib/talloc/talloc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source4/lib/talloc/talloc.c b/source4/lib/talloc/talloc.c
index 577fa4a182..5bb21ee6e6 100644
--- a/source4/lib/talloc/talloc.c
+++ b/source4/lib/talloc/talloc.c
@@ -960,11 +960,13 @@ char *talloc_append_string(const void *t, char *orig, const char *append)
{
char *ret;
size_t olen = strlen(orig);
- size_t alenz = strlen(append) + 1;
+ size_t alenz;
if (!append)
return orig;
+ alenz = strlen(append) + 1;
+
ret = talloc_realloc(t, orig, char, olen + alenz);
if (!ret)
return NULL;