Prevent fix - NULL check after dereference.
authorKrzysztof Jackiewicz <k.jackiewicz@samsung.com>
Mon, 28 Oct 2013 14:19:08 +0000 (15:19 +0100)
committerKrzysztof Jackiewicz <k.jackiewicz@samsung.com>
Tue, 29 Oct 2013 16:20:18 +0000 (17:20 +0100)
[Issue#] N/A
[Feature/Bug] N/A
[Problem] Pervent issue CID 34517
[Cause] Variable was checked against NULL after dereferencing.
[Solution] NULL check removed

[Verification] Successfull compilation

Change-Id: Ie8f878c79c2d0e8fe97e8cfa5f2b116e4cb2fd22

api_feature_loader/api_feature_loader.c

index d032432..94ed04c 100644 (file)
@@ -235,8 +235,8 @@ void load_pemission_type_rules(int (*filter)(const struct dirent *),
 
                load_rules_from_file(s_path, s_permission_name, app_type);
 
-               if(file_list[i]) free(file_list[i]);
-               if(s_path) free(s_path);
+               free(file_list[i]);
+               free(s_path);
                s_path = NULL;
        }
        free(file_list);