Commit 2a29e6c9 authored by Filippos Giannakos's avatar Filippos Giannakos

Fix warning for possibly uninitialized value

parent 74a9fe09
......@@ -268,13 +268,19 @@ static int do_accepted_pr(struct peerd *peer, struct peer_req *pr)
XSEGLOG2(&lc, I, "Do accepted pr started for pr %lx", pr);
target = xseg_get_target(peer->xseg, pr->req);
if (!target)
goto out_err;
if (!target){
vio->err = 1;
conclude_pr(peer, pr);
return -1;
}
vi = find_volume_len(vlmc, target, pr->req->targetlen);
if (!vi){
XSEGLOG2(&lc, E, "Cannot find volume");
goto out_err;
XSEGLOG2(&lc, E, "Pr %lx", pr);
vio->err = 1;
conclude_pr(peer, pr);
return -1;
}
if (pr->req->op == X_CLOSE || pr->req->op == X_SNAPSHOT){
......
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