From 7e24fab698956d06746e4d30fa8c7987be1f6776 Mon Sep 17 00:00:00 2001 From: ilho kim Date: Tue, 2 Apr 2024 06:54:50 +0000 Subject: Revert "Fix pkgmgr_client_usr_clear_cache_dir" This reverts commit 08ecb360d99c083b819d6be8d060b4e15435e1eb. Change-Id: Ib4a6c56878aaed9df17d7f5fb5eab38b345b3c2f --- client/src/api_stub.cc | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/client/src/api_stub.cc b/client/src/api_stub.cc index bff1a7a..04eb2c0 100644 --- a/client/src/api_stub.cc +++ b/client/src/api_stub.cc @@ -1579,22 +1579,7 @@ API int pkgmgr_client_usr_clear_cache_dir(const char *pkgid, uid_t uid) { return PKGMGR_R_EINVAL; } - pkgmgr_client_t* raw_pc = - static_cast(calloc(1, sizeof(pkgmgr_client_t))); - if (raw_pc == nullptr) { - _E("out of memory"); - return PKGMGR_R_ENOMEM; - } - - raw_pc->pc_type = PC_REQUEST; - - if (pkgmgr_client_connection_connect(raw_pc) != PKGMGR_R_OK) { - _E("pkgmgr_client_connection_connect fail"); - free(raw_pc); - return PKGMGR_R_ECOMM; - } - - auto* con = new Connector(PC_REQUEST, raw_pc); + auto* con = new Connector(PC_REQUEST); auto* proxy = con->GetCacheProxy(); if (proxy == nullptr) return PKGMGR_R_EIO; -- cgit v1.2.3