Add checking abi_version pointer existence
authorYunhee Seo <yuni.seo@samsung.com>
Wed, 21 Feb 2024 06:38:24 +0000 (15:38 +0900)
committerYunhee Seo <yuni.seo@samsung.com>
Wed, 21 Feb 2024 06:38:24 +0000 (15:38 +0900)
When obtainig the abi_version, abi_version pointer should be exist.
Checking the pointer existence part was omitted.

Change-Id: I5852bdcfd288aec485643e599af56d358b2d7739
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
src/hal-api-common.c

index 3d1cd7d9db53a47397b7fb09bc11350652fb5834..6dc8c52a241a31ac2b1b7b9fa6fc86d80a01ac75 100644 (file)
@@ -448,7 +448,7 @@ static int __get_backend_data(enum hal_module module, unsigned int *abi_version,
                goto err_conf_exit;
 
        /* Return abi_verion of hal_backend structure */
-       if (!name_size && !vendor_size) {
+       if (!name_size && !vendor_size && abi_version) {
                *abi_version = info->backend->abi_version;
 
        /* Return name of hal_backend structure */