svn commit: samba r16596 - in trunk/source/web: .

jra at samba.org jra at samba.org
Wed Jun 28 01:59:00 GMT 2006


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

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

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

Modified:
   trunk/source/web/neg_lang.c


Changeset:
Modified: trunk/source/web/neg_lang.c
===================================================================
--- trunk/source/web/neg_lang.c	2006-06-28 01:56:41 UTC (rev 16595)
+++ trunk/source/web/neg_lang.c	2006-06-28 01:58:59 UTC (rev 16596)
@@ -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="))) {



More information about the samba-cvs mailing list