isc_event_allocate() cannot fail, remove the fail handling blocks
isc_event_allocate() calls isc_mem_get() to allocate the event structure. As isc_mem_get() cannot fail softly (e.g. it never returns NULL), the isc_event_allocate() cannot return NULL, hence we remove the (ret == NULL) handling blocks using the semantic patch from the previous commit.
This commit is contained in:
@@ -213,10 +213,6 @@ syncptr(sample_instance_t *inst, dns_name_t *name,
|
||||
SYNCPTR_WRITE_EVENT,
|
||||
syncptr_write, NULL,
|
||||
sizeof(syncptrevent_t));
|
||||
if (pevent == NULL) {
|
||||
result = ISC_R_NOMEMORY;
|
||||
goto cleanup;
|
||||
}
|
||||
isc_buffer_init(&pevent->b, pevent->buf, sizeof(pevent->buf));
|
||||
dns_fixedname_init(&pevent->ptr_target_name);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user