Use coccinelle to cleanup the failure handling blocks from isc_mem_strdup
This commit is contained in:
@@ -82,10 +82,6 @@ dyndb_init(isc_mem_t *mctx, const char *name, const char *parameters,
|
||||
}
|
||||
|
||||
s = isc_mem_strdup(mctx, parameters);
|
||||
if (s == NULL) {
|
||||
result = ISC_R_NOMEMORY;
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
result = isc_commandline_strtoargv(mctx, s, &argc, &argv, 0);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
|
||||
@@ -95,10 +95,6 @@ new_sample_instance(isc_mem_t *mctx, const char *db_name,
|
||||
isc_mem_attach(mctx, &inst->mctx);
|
||||
|
||||
inst->db_name = isc_mem_strdup(mctx, db_name);
|
||||
if (inst->db_name == NULL) {
|
||||
result = ISC_R_NOMEMORY;
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
inst->zone1_name = dns_fixedname_initname(&inst->zone1_fn);
|
||||
inst->zone2_name = dns_fixedname_initname(&inst->zone2_fn);
|
||||
|
||||
Reference in New Issue
Block a user