mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 18:40:43 +03:00
Fix coverity defects: CID 147565-147567
coverity scan CID:147567, Type:dereference null return value coverity scan CID:147566, Type:dereference null return value coverity scan CID:147565, Type:dereference null return value Reviewed by: Richard Laager <rlaager@wiktel.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: cao.xuewen <cao.xuewen@zte.com.cn> Closes #5166
This commit is contained in:
+2
-1
@@ -87,13 +87,14 @@ bqueue_enqueue(bqueue_t *q, void *data, uint64_t item_size)
|
||||
void *
|
||||
bqueue_dequeue(bqueue_t *q)
|
||||
{
|
||||
void *ret;
|
||||
void *ret = NULL;
|
||||
uint64_t item_size;
|
||||
mutex_enter(&q->bq_lock);
|
||||
while (q->bq_size == 0) {
|
||||
cv_wait(&q->bq_pop_cv, &q->bq_lock);
|
||||
}
|
||||
ret = list_remove_head(&q->bq_list);
|
||||
ASSERT3P(ret, !=, NULL);
|
||||
item_size = obj2node(q, ret)->bqn_size;
|
||||
q->bq_size -= item_size;
|
||||
mutex_exit(&q->bq_lock);
|
||||
|
||||
@@ -270,6 +270,7 @@ spa_config_sync(spa_t *target, boolean_t removing, boolean_t postsysevent)
|
||||
mutex_enter(&spa->spa_props_lock);
|
||||
tdp = list_head(&spa->spa_config_list);
|
||||
if (spa->spa_config == NULL ||
|
||||
tdp == NULL ||
|
||||
tdp->scd_path == NULL ||
|
||||
strcmp(tdp->scd_path, dp->scd_path) != 0) {
|
||||
mutex_exit(&spa->spa_props_lock);
|
||||
|
||||
Reference in New Issue
Block a user