Skip to content
Snippets Groups Projects
Commit 576e2d85 authored by Adam Wujek's avatar Adam Wujek
Browse files

userspace/libwr/shmem: fix checking params in wrs_shm_get_and_check


Check if head is not NULL

Signed-off-by: default avatarAdam Wujek <dev_public@wujek.eu>
parent b9da3a4f
Branches
Tags
No related merge requests found
......@@ -191,7 +191,7 @@ int wrs_shm_get_and_check(enum wrs_shm_name shm_name,
int ret;
/* try to open shmem */
if (!(*head) && !(*head = wrs_shm_get(shm_name, "",
if (!head || !(*head = wrs_shm_get(shm_name, "",
WRS_SHM_READ | WRS_SHM_LOCKED))) {
return WRS_SHM_OPEN_FAILED;
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment