Fix memory leak of operator certfp fields.
This commit is contained in:
parent
6a00233824
commit
6cb47f18b5
|
@ -628,7 +628,7 @@ conf_end_oper(struct TopConf *tc)
|
|||
}
|
||||
|
||||
if(!EmptyString(yy_oper->certfp))
|
||||
yy_tmpoper->certfp = yy_oper->certfp;
|
||||
yy_tmpoper->certfp = rb_strdup(yy_oper->certfp);
|
||||
#endif
|
||||
|
||||
/* all is ok, put it on oper_conf_list */
|
||||
|
@ -652,6 +652,8 @@ conf_set_oper_flags(void *data)
|
|||
static void
|
||||
conf_set_oper_fingerprint(void *data)
|
||||
{
|
||||
if (yy_oper->certfp)
|
||||
rb_free(yy_oper->certfp);
|
||||
yy_oper->certfp = rb_strdup((char *) data);
|
||||
}
|
||||
|
||||
|
@ -1389,6 +1391,8 @@ conf_set_connect_accept_password(void *data)
|
|||
static void
|
||||
conf_set_connect_fingerprint(void *data)
|
||||
{
|
||||
if (yy_server->certfp)
|
||||
rb_free(yy_server->certfp);
|
||||
yy_server->certfp = rb_strdup((char *) data);
|
||||
|
||||
/* force SSL to be enabled if fingerprint is enabled. */
|
||||
|
|
|
@ -261,6 +261,7 @@ free_oper_conf(struct oper_conf *oper_p)
|
|||
rb_free(oper_p->username);
|
||||
rb_free(oper_p->host);
|
||||
rb_free(oper_p->name);
|
||||
rb_free(oper_p->certfp);
|
||||
|
||||
if(oper_p->passwd)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue