mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-30 14:07:59 +00:00
A few isc_mem_strdup() failures weren't handled well.
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: confkeys.c,v 1.27 2000/08/01 01:23:21 tale Exp $ */
|
||||
/* $Id: confkeys.c,v 1.28 2000/10/19 01:38:25 bwelling Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@@ -244,6 +244,7 @@ dns_c_kdef_new(isc_mem_t *mem, const char *name, dns_c_kdef_t **keyid)
|
||||
kd->keyid = isc_mem_strdup(mem, name);
|
||||
if (kd->keyid == NULL) {
|
||||
isc_mem_put(mem, kd, sizeof *kd);
|
||||
return (ISC_R_NOMEMORY);
|
||||
}
|
||||
|
||||
kd->magic = DNS_C_KDEF_MAGIC;
|
||||
@@ -600,6 +601,10 @@ dns_c_kid_new(isc_mem_t *mem, const char *name, dns_c_kid_t **keyid)
|
||||
ki->magic = DNS_C_KEYID_MAGIC;
|
||||
ki->mem = mem;
|
||||
ki->keyid = isc_mem_strdup(mem, name);
|
||||
if (ki->keyid == NULL) {
|
||||
isc_mem_put(mem, ki, sizeof *ki);
|
||||
return (ISC_R_NOMEMORY);
|
||||
}
|
||||
|
||||
ISC_LINK_INIT(ki, next);
|
||||
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: conflwres.c,v 1.4 2000/10/19 01:26:36 gson Exp $ */
|
||||
/* $Id: conflwres.c,v 1.5 2000/10/19 01:38:26 bwelling Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@@ -394,6 +394,10 @@ dns_c_search_new(isc_mem_t *mem, const char *val, dns_c_search_t **search)
|
||||
ki->magic = DNS_C_SEARCH_MAGIC;
|
||||
ki->mem = mem;
|
||||
ki->search = isc_mem_strdup(mem, val);
|
||||
if (ki->search == NULL) {
|
||||
isc_mem_put(mem, ki, sizeof *ki);
|
||||
return (ISC_R_NOMEMORY);
|
||||
}
|
||||
|
||||
ISC_LINK_INIT(ki, next);
|
||||
|
||||
|
Reference in New Issue
Block a user