diff options
author | Jeremy Allison <jra@samba.org> | 2006-06-28 01:59:04 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:19:02 -0500 |
commit | 9f4c335401e5e34f290295c0b36e193d0b0f43ff (patch) | |
tree | b34438029e44a1f67569a6f78794856f9c5e7fea /source3/web | |
parent | 35a57320f881ee9ab6e5b49247eef99f2d984cf2 (diff) | |
download | samba-9f4c335401e5e34f290295c0b36e193d0b0f43ff.tar.gz samba-9f4c335401e5e34f290295c0b36e193d0b0f43ff.tar.bz2 samba-9f4c335401e5e34f290295c0b36e193d0b0f43ff.zip |
r16597: Klocwork #2006. Fix possible null deref.
Jeremy.
(This used to be commit 9b73385d6b90c7806d8ccfc1f2354ede761fad61)
Diffstat (limited to 'source3/web')
-rw-r--r-- | source3/web/neg_lang.c | 4 |
1 files changed, 4 insertions, 0 deletions
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="))) { |