Check parameter and return error
[platform/core/system/libstorage.git] / src / storage-inhouse.c
index 946b4d8..5a9ca1f 100755 (executable)
@@ -429,6 +429,9 @@ API int storage_is_mounted_opt_usr(storage_part_mount_e *mounted)
        int ret;
        bool found = false;
 
+       if (!mounted)
+               return STORAGE_ERROR_INVALID_PARAMETER;
+
        ret = blkid_get_cache(&cache, NULL);
        if (ret < 0) {
                _E("Failed to get cache"); //LCOV_EXCL_LINE