diff options
author | Dongwoo Lee <dwoo08.lee@samsung.com> | 2022-09-15 19:51:18 +0900 |
---|---|---|
committer | Dongwoo Lee <dwoo08.lee@samsung.com> | 2022-09-15 19:51:18 +0900 |
commit | e561e82bd928cb24c0e44ff9f12ad5882476acc0 (patch) | |
tree | a78fcb2f465b70b95f6e8584563de25a1c398cd9 | |
parent | c709c78da0af3807289cd74fe148572f8d39ff2c (diff) | |
download | pass-e561e82bd928cb24c0e44ff9f12ad5882476acc0.tar.gz pass-e561e82bd928cb24c0e44ff9f12ad5882476acc0.tar.bz2 pass-e561e82bd928cb24c0e44ff9f12ad5882476acc0.zip |
resource: Fix missing NULL check
Change-Id: I8a9f2d5139ad6298788d373485d24110e9d85979
Signed-off-by: Dongwoo Lee <dwoo08.lee@samsung.com>
-rw-r--r-- | src/util/resource.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/util/resource.c b/src/util/resource.c index 2def817..39ccc68 100644 --- a/src/util/resource.c +++ b/src/util/resource.c @@ -233,6 +233,9 @@ int create_resource(struct resource **res, int resource_type) struct resource *resource = NULL; int i, ret; + if (!res) + return -EINVAL; + driver = find_resource_driver(resource_type); if (!driver) { _E("failed to find resource driver, res:type(%d)\n", |