Commit d2fd7b60 authored by Dridi Boukelmoune's avatar Dridi Boukelmoune

directors: Missing shard error handling

Spotted by Coverity.
parent 303ff55a
......@@ -109,6 +109,10 @@ shard_change_get(VRT_CTX, struct sharddir * const shardd)
CHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC);
task = VRT_priv_task(ctx, id);
if (task == NULL) {
shard_fail(ctx, shardd->name, "%s", "no priv_task");
return (NULL);
}
if (task->priv != NULL) {
CAST_OBJ_NOTNULL(change, task->priv, SHARD_CHANGE_MAGIC);
......
Markdown is supported
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