From 188bfbc19230c5451059375cb648d06362ac9395 Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Mon, 21 Jan 2008 15:24:23 +0100 Subject: Add a check for talloc failure. - Pointed out by Volker. Michael (This used to be commit bdc49b07cc6de36c9319254a131858c9a7f9dd53) --- source3/libnet/libnet_conf.c | 4 ++++ 1 file changed, 4 insertions(+) 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; -- cgit