diff options
author | Sander Vrijders <[email protected]> | 2017-08-29 13:14:25 +0200 |
---|---|---|
committer | Sander Vrijders <[email protected]> | 2017-08-29 13:14:25 +0200 |
commit | 4de841c26b7208d5395da349ea16c937b1361414 (patch) | |
tree | d86a1c02b36cfc5feea1ba5f22c6899f8a6c0c9c /src/lib/rib.c | |
parent | e8875c08ac04a1d9aca342d94d4f788239334f72 (diff) | |
download | ouroboros-4de841c26b7208d5395da349ea16c937b1361414.tar.gz ouroboros-4de841c26b7208d5395da349ea16c937b1361414.zip |
lib, ipcpd, irmd: Fix bugs reported by static analysis
This fixes several bugs as reported by the clang static analyzer.
Diffstat (limited to 'src/lib/rib.c')
-rw-r--r-- | src/lib/rib.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/rib.c b/src/lib/rib.c index bbe996e7..9e45a302 100644 --- a/src/lib/rib.c +++ b/src/lib/rib.c @@ -788,7 +788,7 @@ static struct rib_sub * rib_get_sub(uint32_t sid) return r; } - return 0; + return NULL; } static struct rib_sub * rib_sub_create(uint32_t sid) @@ -1140,6 +1140,8 @@ int rib_event_wait(ro_set_t * set, sub = rib_get_sub(set->sid); + assert(sub); + pthread_rwlock_unlock(&rib.lock); pthread_mutex_lock(&sub->lock); |