mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 14:35:26 +00:00
Remove blocks checking whether isc_mem_get() failed using the coccinelle
This commit is contained in:
@@ -547,8 +547,6 @@ dns_diff_sort(dns_diff_t *diff, dns_diff_compare_func *compare) {
|
||||
if (length == 0)
|
||||
return (ISC_R_SUCCESS);
|
||||
v = isc_mem_get(diff->mctx, length * sizeof(dns_difftuple_t *));
|
||||
if (v == NULL)
|
||||
return (ISC_R_NOMEMORY);
|
||||
for (i = 0; i < length; i++) {
|
||||
p = ISC_LIST_HEAD(diff->tuples);
|
||||
v[i] = p;
|
||||
@@ -600,8 +598,6 @@ dns_diff_print(dns_diff_t *diff, FILE *file) {
|
||||
REQUIRE(DNS_DIFF_VALID(diff));
|
||||
|
||||
mem = isc_mem_get(diff->mctx, size);
|
||||
if (mem == NULL)
|
||||
return (ISC_R_NOMEMORY);
|
||||
|
||||
for (t = ISC_LIST_HEAD(diff->tuples); t != NULL;
|
||||
t = ISC_LIST_NEXT(t, link))
|
||||
@@ -630,10 +626,6 @@ dns_diff_print(dns_diff_t *diff, FILE *file) {
|
||||
isc_mem_put(diff->mctx, mem, size);
|
||||
size += 1024;
|
||||
mem = isc_mem_get(diff->mctx, size);
|
||||
if (mem == NULL) {
|
||||
result = ISC_R_NOMEMORY;
|
||||
goto cleanup;
|
||||
}
|
||||
goto again;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user