From 9f4c335401e5e34f290295c0b36e193d0b0f43ff Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 28 Jun 2006 01:59:04 +0000 Subject: r16597: Klocwork #2006. Fix possible null deref. Jeremy. (This used to be commit 9b73385d6b90c7806d8ccfc1f2354ede761fad61) --- source3/web/neg_lang.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source3') diff --git a/source3/web/neg_lang.c b/source3/web/neg_lang.c index ca671822d8..fb79f41f13 100644 --- a/source3/web/neg_lang.c +++ b/source3/web/neg_lang.c @@ -86,6 +86,10 @@ void web_set_lang(const char *lang_string) lang_num++; } pl = SMB_MALLOC_ARRAY(struct pri_list, lang_num); + if (!pl) { + return; + } + for (i = 0; i < lang_num; i++) { char *pri_code; if ((pri_code=strstr(lang_list[i], ";q="))) { -- cgit