summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2006-03-10 08:47:59 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:11:14 -0500
commit645826673a0264f808cc2e52f8ed28bc28760858 (patch)
tree573dbf5af02f61ef599f6d0a9d097894368134b6 /source3/lib
parentc077d363a4f14afd2c83d57dcd52e6a2c1a2d42b (diff)
downloadsamba-645826673a0264f808cc2e52f8ed28bc28760858.tar.gz
samba-645826673a0264f808cc2e52f8ed28bc28760858.tar.bz2
samba-645826673a0264f808cc2e52f8ed28bc28760858.zip
r14131: Fix Coverity bug # 127
(This used to be commit c105bfae2647752b31d8c3b59a0ee80c56f97138)
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/talloc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source3/lib/talloc.c b/source3/lib/talloc.c
index 00f889d682..445ae8f3e9 100644
--- a/source3/lib/talloc.c
+++ b/source3/lib/talloc.c
@@ -1026,11 +1026,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;