Add a missing nullptr check 16/279116/1
authorHwankyu Jhun <h.jhun@samsung.com>
Tue, 2 Aug 2022 07:33:15 +0000 (16:33 +0900)
committerHwankyu Jhun <h.jhun@samsung.com>
Tue, 2 Aug 2022 07:33:15 +0000 (16:33 +0900)
Before setting the result to the argument, the function has to check
whether the argument is nullptr or not.

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

index af57d43..a0d60f1 100644 (file)
@@ -779,7 +779,7 @@ API int aul_app_is_running_with_instance_id(const char *appid,
        bundle *b;
        int ret;
 
-       if (!appid || !instance_id) {
+       if (!appid || !instance_id || !running) {
                _E("Invalid parameter");
                return AUL_R_EINVAL;
        }