mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-09-03 08:05:21 +00:00
fix memory leak
This commit is contained in:
@@ -108,10 +108,13 @@ main(int argc, char *argv[]) {
|
|||||||
value.as_pointer = mem_strdup(mctx, cp);
|
value.as_pointer = mem_strdup(mctx, cp);
|
||||||
result = isc_symtab_define(st, key, 1, value,
|
result = isc_symtab_define(st, key, 1, value,
|
||||||
exists_policy);
|
exists_policy);
|
||||||
if (trace || result != ISC_R_SUCCESS)
|
if (trace || result != ISC_R_SUCCESS) {
|
||||||
printf("define('%s', '%s'): %s\n",
|
printf("define('%s', '%s'): %s\n",
|
||||||
key, cp,
|
key, cp,
|
||||||
isc_result_totext(result));
|
isc_result_totext(result));
|
||||||
|
if (result != ISC_R_SUCCESS)
|
||||||
|
undefine_action(key, 1, value);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user