(parse_reply): error check malloc properly

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@6403 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Assar Westerlund
1999-07-03 02:36:26 +00:00
parent 4135fc6940
commit 5656cb2244

View File

@@ -243,7 +243,7 @@ parse_reply(unsigned char *data, int len)
default:
(*rr)->u.data = (unsigned char*)malloc(size);
if((*rr)->u.data == NULL) {
if(size != 0 && (*rr)->u.data == NULL) {
dns_free_data(r);
return NULL;
}