license-manager-agent: fix memory leak 01/168601/1
authorRafal Krypa <r.krypa@samsung.com>
Mon, 29 Jan 2018 13:17:54 +0000 (14:17 +0100)
committerRafal Krypa <r.krypa@samsung.com>
Mon, 29 Jan 2018 13:26:45 +0000 (14:26 +0100)
Data allocated by cynara_agent_get_request() must be freed with the
free() function.

Change-Id: Ifedeebfd82d06217c833145e298c36c4b3f2cc34

src/license-manager/agent/agent.cpp

index 35d7fe6..c8b15e1 100644 (file)
@@ -63,6 +63,7 @@ bool Agent::mainLoop() {
         std::string request;
         if (data) {
             request = std::string(static_cast<char*>(data), dataSize);
+            free(data);
         }
 
         ALOGD("LICENSE_MANAGER cynara_agent_put_response.");