Fix memory leak of returned value of afb_x2_req_application_id
Fixed
Description
According to afb_x2_req.h, returned value of afb_req_x2_get_application_id must be freed by the caller. Window Manager uses this function, so need to release the returned value.
/**
* Get the application identifier of the client application for the
* request 'req'.
*
* Returns the application identifier or NULL when the application
* can not be identified.
*
* The returned value if not NULL must be freed by the caller
*
* @param req the request
*
* @return the string for the application id of the client MUST BE FREED
*/
static inline
char *afb_req_x2_get_application_id(
struct afb_req_x2 *req)
{
return req->itf->get_application_id(req);
}
@knimitz There are still two gerrit changes (17265 and 17367) that need to be merged for this issue. You have -1 on them both to be merged at the same time. Can we go ahead with that, should those be abandoned, or should the topic for those be changed to something besides SPEC-1819?
According to afb_x2_req.h,
returned value of afb_req_x2_get_application_id must be freed by the caller.
Window Manager uses this function, so need to release the returned value.
/** * Get the application identifier of the client application for the * request 'req'. * * Returns the application identifier or NULL when the application * can not be identified. * * The returned value if not NULL must be freed by the caller * * @param req the request * * @return the string for the application id of the client MUST BE FREED */ static inline char *afb_req_x2_get_application_id( struct afb_req_x2 *req) { return req->itf->get_application_id(req); }