restconf fcgi mem leak in indata

test pkill needs sleep before name settles
This commit is contained in:
Olof hagsand 2021-06-27 16:32:10 +02:00
parent df05acdc9e
commit 3539a80d5e
6 changed files with 19 additions and 10 deletions

View file

@ -220,8 +220,11 @@ restconf_reply_send(void *req0,
return retval;
}
/*!
/*! Get input data from http request, eg such as curl -X PUT http://... <indata>
* @param[in] req Fastcgi request handle
* @retval indata
* @retval NULL Error
* @note: creates a new cbuf which differs from native api where a pointer is returned
*/
cbuf *
restconf_get_indata(void *req0)

View file

@ -172,9 +172,9 @@ restconf_reply_send(void *req0,
return retval;
}
/*! get input data
* @param[in] req Fastcgi request handle
* @note Pulls up an event buffer and then copies it to a cbuf. This is not efficient.
/*! Get input data from http request, eg such as curl -X PUT http://... <indata>
* @param[in] req Request handle
* @note: reuses cbuf from stream-data
*/
cbuf *
restconf_get_indata(void *req0)

View file

@ -588,6 +588,10 @@ api_root_restconf(clicon_handle h,
retval = 0;
done:
clicon_debug(1, "%s retval:%d", __FUNCTION__, retval);
#ifdef WITH_RESTCONF_FCGI
if (cb)
cbuf_free(cb);
#endif
if (xerr)
xml_free(xerr);
if (username)