[HEIMDAL-646] malloc(0) checks for AIX

This commit is contained in:
Love Hornquist Astrand
2009-10-11 17:33:13 -07:00
parent b4013ca830
commit b0e53280e2

View File

@@ -744,7 +744,7 @@ generate_type_decode (const Symbol *s)
if (preserve)
fprintf (codefile,
"data->_save.data = calloc(1, ret);\n"
"if (data->_save.data == NULL) { \n"
"if (data->_save.data == NULL && ret != 0) { \n"
"e = ENOMEM; goto fail; \n"
"}\n"
"data->_save.length = ret;\n"