Polish 50780f30

Do not overwrite an already latched errno.

Note that it does not make any difference at the moment because we only
ever use ENOMEM

Ref #3502
parent c7523b63
......@@ -120,10 +120,12 @@ vfp_esi_end(struct vfp_ctx *vc, struct vef_priv *vef,
CHECK_OBJ_NOTNULL(vc, VFP_CTX_MAGIC);
CHECK_OBJ_NOTNULL(vef, VEF_MAGIC);
if (retval == VFP_ERROR)
vef->error = errno ? errno : EINVAL;
else
if (retval == VFP_ERROR) {
if (vef->error == 0)
vef->error = errno ? errno : EINVAL;
} else {
assert(retval == VFP_END);
}
vsb = VEP_Finish(vef->vep);
......
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