mirror of
https://github.com/isc-projects/bind9.git
synced 2026-03-06 15:30:29 -05:00
Fix a memory leak in dns_dlzcreate()
dns_dlzcreate() fails to free the memory allocated for dlzname
when an error occurs.
Free dlzname's memory (acquired earlier with isc_mem_strdup())
by calling isc_mem_free() before returning an error code.
(cherry picked from commit 4a6c66288f)
This commit is contained in:
parent
b5735ec37a
commit
254cabb558
1 changed files with 1 additions and 0 deletions
|
|
@ -230,6 +230,7 @@ dns_dlzcreate(isc_mem_t *mctx, const char *dlzname, const char *drivername,
|
|||
|
||||
/* impinfo->methods->create failed. */
|
||||
RWUNLOCK(&dlz_implock, isc_rwlocktype_read);
|
||||
isc_mem_free(mctx, db->dlzname);
|
||||
isc_mem_put(mctx, db, sizeof(dns_dlzdb_t));
|
||||
return (result);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue