mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-29 21:47:59 +00:00
1173. [bug] Potential leaks in isc_log_create() and
isc_log_settag(). [RT #2336]
This commit is contained in:
parent
ac69ec1294
commit
cad61731f8
3
CHANGES
3
CHANGES
@ -1,3 +1,6 @@
|
||||
1173. [bug] Potential leaks in isc_log_create() and
|
||||
isc_log_settag(). [RT #2336]
|
||||
|
||||
1172. [doc] Add CERT, GPOS, KX, NAPTR, NSAP, PX and TXT to
|
||||
table of RR types in ARM.
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: log.c,v 1.72 2001/11/30 01:59:34 gson Exp $ */
|
||||
/* $Id: log.c,v 1.73 2002/01/09 06:16:10 marka Exp $ */
|
||||
|
||||
/* Principal Authors: DCL */
|
||||
|
||||
@ -302,9 +302,12 @@ isc_log_create(isc_mem_t *mctx, isc_log_t **lctxp, isc_logconfig_t **lcfgp) {
|
||||
if (lcfgp != NULL)
|
||||
*lcfgp = lcfg;
|
||||
|
||||
} else
|
||||
} else {
|
||||
if (lcfg != NULL)
|
||||
isc_logconfig_destroy(&lcfg);
|
||||
if (lctx != NULL)
|
||||
isc_log_destroy(&lctx);
|
||||
}
|
||||
|
||||
return (result);
|
||||
}
|
||||
@ -980,6 +983,8 @@ isc_log_settag(isc_logconfig_t *lcfg, const char *tag) {
|
||||
REQUIRE(VALID_CONFIG(lcfg));
|
||||
|
||||
if (tag != NULL && *tag != '\0') {
|
||||
if (lcfg->tag != NULL)
|
||||
isc_mem_free(lcfg->lctx->mctx, lcfg->tag);
|
||||
lcfg->tag = isc_mem_strdup(lcfg->lctx->mctx, tag);
|
||||
if (lcfg->tag == NULL)
|
||||
return (ISC_R_NOMEMORY);
|
||||
|
Loading…
x
Reference in New Issue
Block a user