summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2008-01-21 15:24:23 +0100
committerMichael Adam <obnox@samba.org>2008-01-21 22:49:45 +0100
commit188bfbc19230c5451059375cb648d06362ac9395 (patch)
treee340eb9365ac2a71293fafe49994d3c746a46b86 /source3
parent59c0aa3afd3d4d9ec4b248ef89d32fdcdbd7eca2 (diff)
downloadsamba-188bfbc19230c5451059375cb648d06362ac9395.tar.gz
samba-188bfbc19230c5451059375cb648d06362ac9395.tar.bz2
samba-188bfbc19230c5451059375cb648d06362ac9395.zip
Add a check for talloc failure. - Pointed out by Volker.
Michael (This used to be commit bdc49b07cc6de36c9319254a131858c9a7f9dd53)
Diffstat (limited to 'source3')
-rw-r--r--source3/libnet/libnet_conf.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source3/libnet/libnet_conf.c b/source3/libnet/libnet_conf.c
index d20e10b141..152148300e 100644
--- a/source3/libnet/libnet_conf.c
+++ b/source3/libnet/libnet_conf.c
@@ -48,6 +48,10 @@ static WERROR libnet_conf_add_string_to_array(TALLOC_CTX *mem_ctx,
}
new_array[count] = talloc_strdup(new_array, string);
+ if (new_array[count] == NULL) {
+ TALLOC_FREE(new_array);
+ return WERR_NOMEM;
+ }
*array = new_array;