(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:
@@ -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) {
|
||||
|
Reference in New Issue
Block a user