mirror of
https://github.com/systemd/systemd.git
synced 2025-01-04 23:53:42 +08:00
resolved: check return value of memdup() correctly for OOM
This commit is contained in:
parent
8b2e362651
commit
a63a1252b5
@ -1650,7 +1650,7 @@ DnsResourceRecord *dns_resource_record_copy(DnsResourceRecord *rr) {
|
||||
return NULL;
|
||||
copy->nsec3.salt_size = rr->nsec3.salt_size;
|
||||
copy->nsec3.next_hashed_name = memdup(rr->nsec3.next_hashed_name, rr->nsec3.next_hashed_name_size);
|
||||
if (!copy->nsec3.next_hashed_name_size)
|
||||
if (!copy->nsec3.next_hashed_name)
|
||||
return NULL;
|
||||
copy->nsec3.next_hashed_name_size = rr->nsec3.next_hashed_name_size;
|
||||
copy->nsec3.types = bitmap_copy(rr->nsec3.types);
|
||||
|
Loading…
Reference in New Issue
Block a user