Author: jra
Date: 2006-06-28 01:59:04 +0000 (Wed, 28 Jun 2006)
New Revision: 16597

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=16597

Log:
Klocwork #2006. Fix possible null deref.
Jeremy.

Modified:
   branches/SAMBA_3_0/source/web/neg_lang.c


Changeset:
Modified: branches/SAMBA_3_0/source/web/neg_lang.c
===================================================================
--- branches/SAMBA_3_0/source/web/neg_lang.c    2006-06-28 01:58:59 UTC (rev 
16596)
+++ branches/SAMBA_3_0/source/web/neg_lang.c    2006-06-28 01:59:04 UTC (rev 
16597)
@@ -86,6 +86,10 @@
                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="))) {

Reply via email to