Fix wrong exception handling about appid check 10/279610/1
authorHwankyu Jhun <h.jhun@samsung.com>
Fri, 12 Aug 2022 08:16:24 +0000 (17:16 +0900)
committerHwankyu Jhun <h.jhun@samsung.com>
Fri, 12 Aug 2022 08:16:24 +0000 (17:16 +0900)
If the appid is nullptr in the __check_request() function, the function
should return 0.

Change-Id: If4ca58c64a7af396e266aa534545482c83003522
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
src/lib/amd_request.c

index 7640c69194095649fbe226c7edd6df042d2f98ee..eff6bef79c45539d2eb8b7cfeefed265fd26c912 100644 (file)
@@ -475,11 +475,11 @@ static int __check_request(request_h req)
                return 0;
 
        if (req->kb == NULL)
-               return -1;
+               return 0;
 
        appid = bundle_get_val(req->kb, AUL_K_APPID);
        if (appid == NULL)
-               return -1;
+               return 0;
 
        app_status = __get_app_status(req, appid);
        if (app_status == NULL)