locks: FORWARD_NULL coverity fix
Problem: "dst" could be NULL. Solution: Added a condition check to avoid NULL pointer dereferencing. BUG: 789278 Change-Id: I13ccf3234eda50a197f5fdfaf35b247589302582 Signed-off-by: Shwetha Acharya <shwetha174@gmail.com>
This commit is contained in:
parent
bae16c4985
commit
8f437f6c06
@ -529,7 +529,9 @@ __copy_lock(posix_lock_t *src)
|
||||
GF_FREE(dst);
|
||||
dst = NULL;
|
||||
}
|
||||
INIT_LIST_HEAD (&dst->list);
|
||||
|
||||
if (dst != NULL)
|
||||
INIT_LIST_HEAD (&dst->list);
|
||||
}
|
||||
|
||||
return dst;
|
||||
|
Loading…
x
Reference in New Issue
Block a user