(generic_test): check malloc return value properly

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@6466 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Assar Westerlund
1999-07-14 20:58:31 +00:00
parent fa1515c076
commit 6860cee394

View File

@@ -78,7 +78,7 @@ generic_test (const struct test_case *tests,
int ret = 0;
void *val = malloc (data_size);
if (val == NULL)
if (data_size != 0 && val == NULL)
err (1, "malloc");
for (i = 0; i < ntests; ++i) {