check allocation errors correctly
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@15143 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user