From 10c8d0da802840ff6181a494bb6de0b0659f401a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Love=20H=C3=B6rnquist=20=C3=85strand?= Date: Mon, 16 May 2005 08:52:54 +0000 Subject: [PATCH] check allocation errors correctly git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@15143 ec53bebd-3082-4978-b11e-865c3cabbd6b --- lib/com_err/lex.l | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/com_err/lex.l b/lib/com_err/lex.l index f23ae5d7e..4d56be4da 100644 --- a/lib/com_err/lex.l +++ b/lib/com_err/lex.l @@ -110,7 +110,7 @@ getstring(void) } x[i] = '\0'; yylval.string = strdup(x); - if (yylval.string) + if (yylval.string == NULL) err(1, "malloc"); return STRING; }