evhtp mem leak, debug 1->2
This commit is contained in:
parent
804b329301
commit
a61bdffbab
6 changed files with 24 additions and 13 deletions
|
|
@ -24,7 +24,7 @@
|
|||
* [3.3.1](#331) June 7 2017
|
||||
|
||||
## 4.7.0
|
||||
Expected: September 2020
|
||||
Expected: 15 September 2020
|
||||
|
||||
### API changes on existing protocol/config features
|
||||
|
||||
|
|
|
|||
|
|
@ -551,9 +551,9 @@ from_validate_common(clicon_handle h,
|
|||
* do something more drastic?
|
||||
* @param[in] h Clicon handle
|
||||
* @param[in] candidate A candidate database, not necessarily "candidate"
|
||||
* @retval -1 Error - or validation failed
|
||||
* @retval 0 Validation failed (with cbret set)
|
||||
* @retval 1 Validation OK
|
||||
* @retval -1 Error - or validation failed
|
||||
* @retval 0 Validation failed (with cbret set)
|
||||
* @retval 1 Validation OK
|
||||
*/
|
||||
int
|
||||
candidate_commit(clicon_handle h,
|
||||
|
|
|
|||
|
|
@ -97,14 +97,23 @@ static struct evhtp_handle{
|
|||
static void
|
||||
evhtp_terminate(struct evhtp_handle *eh)
|
||||
{
|
||||
evhtp_ssl_cfg_t *sc;
|
||||
|
||||
if (eh->eh_htp){
|
||||
evhtp_unbind_socket(eh->eh_htp);
|
||||
evhtp_free(eh->eh_htp);
|
||||
}
|
||||
if (eh->eh_evbase)
|
||||
event_base_free(eh->eh_evbase);
|
||||
if (eh->eh_ssl_config)
|
||||
free(eh->eh_ssl_config);
|
||||
if ((sc = eh->eh_ssl_config) != NULL){
|
||||
if (sc->cafile)
|
||||
free(sc->cafile);
|
||||
if (sc->pemfile)
|
||||
free(sc->pemfile);
|
||||
if (sc->privfile)
|
||||
free(sc->privfile);
|
||||
free(sc);
|
||||
}
|
||||
}
|
||||
|
||||
/*! Signall terminates process
|
||||
|
|
@ -288,7 +297,7 @@ evhtp_params_set(clicon_handle h,
|
|||
evhtp_uri_t *uri;
|
||||
evhtp_path_t *path;
|
||||
evhtp_ssl_t *ssl = NULL;
|
||||
char *subject;
|
||||
char *subject = NULL;
|
||||
cvec *cvv = NULL;
|
||||
char *cn;
|
||||
|
||||
|
|
@ -345,6 +354,8 @@ evhtp_params_set(clicon_handle h,
|
|||
goto done;
|
||||
retval = 1;
|
||||
done:
|
||||
if (subject)
|
||||
free(subject);
|
||||
if (cvv)
|
||||
cvec_free(cvv);
|
||||
return retval;
|
||||
|
|
|
|||
|
|
@ -731,7 +731,7 @@ xmldb_get_cache(clicon_handle h,
|
|||
*xtop = x1t;
|
||||
retval = 1;
|
||||
done:
|
||||
clicon_debug(1, "%s retval:%d", __FUNCTION__, retval);
|
||||
clicon_debug(2, "%s retval:%d", __FUNCTION__, retval);
|
||||
if (xvec)
|
||||
free(xvec);
|
||||
return retval;
|
||||
|
|
@ -832,7 +832,7 @@ xmldb_get_zerocopy(clicon_handle h,
|
|||
*xtop = x0t;
|
||||
retval = 1;
|
||||
done:
|
||||
clicon_debug(1, "%s retval:%d", __FUNCTION__, retval);
|
||||
clicon_debug(2, "%s retval:%d", __FUNCTION__, retval);
|
||||
if (xvec)
|
||||
free(xvec);
|
||||
return retval;
|
||||
|
|
|
|||
|
|
@ -776,7 +776,7 @@ api_path2xpath_cvv(cvec *api_path,
|
|||
nsc = NULL;
|
||||
}
|
||||
done:
|
||||
clicon_debug(1, "%s retval:%d", __FUNCTION__, retval);
|
||||
clicon_debug(2, "%s retval:%d", __FUNCTION__, retval);
|
||||
if (cberr)
|
||||
cbuf_free(cberr);
|
||||
if (valvec)
|
||||
|
|
@ -1052,7 +1052,7 @@ api_path2xml_vec(char **vec,
|
|||
ok:
|
||||
retval = 1; /* OK */
|
||||
done:
|
||||
clicon_debug(1, "%s retval:%d", __FUNCTION__, retval);
|
||||
clicon_debug(2, "%s retval:%d", __FUNCTION__, retval);
|
||||
if (cberr)
|
||||
cbuf_free(cberr);
|
||||
if (prefix)
|
||||
|
|
@ -1108,7 +1108,7 @@ api_path2xml(char *api_path,
|
|||
cxobj *xroot;
|
||||
cbuf *cberr = NULL;
|
||||
|
||||
clicon_debug(1, "%s api_path:%s", __FUNCTION__, api_path);
|
||||
clicon_debug(2, "%s api_path:%s", __FUNCTION__, api_path);
|
||||
if (xtop == NULL){
|
||||
clicon_err(OE_XML, EINVAL, "xtop is NULL");
|
||||
goto done;
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ ssh -t $h "(cd src/cligen; /tmp/cligen-mk.sh)"
|
|||
# pull git changes and build clixon
|
||||
ssh -t $h "test -d src/clixon || (cd src;git clone https://github.com/clicon/clixon.git)"
|
||||
ssh -t $h "(cd src/clixon;git pull)"
|
||||
ssh -t $h "(cd src/clixon; /tmp/clixon-config.sh $evhtp)"
|
||||
ssh -t $h "(cd src/clixon; /tmp/clixon-config.sh $restconf)"
|
||||
ssh -t $h "(cd src/clixon; /tmp/clixon-mk.sh)"
|
||||
ssh -t $h sudo ldconfig
|
||||
# Run clixon test suite
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue