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