mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-04-26 15:14:42 +00:00
remote: Add missing virCondDestroy calls
The virCond of the remote_thread_call struct was leaked in some places. This results in leaking the underlying mutex. Which in turn leaks a handle on Windows. Reported by Aliaksandr Chabatar and Ihar Smertsin.
This commit is contained in:
parent
80e6200f32
commit
55fb386671
@ -8609,6 +8609,7 @@ remoteStreamPacket(virStreamPtr st,
|
|||||||
xdr_destroy (&xdr);
|
xdr_destroy (&xdr);
|
||||||
|
|
||||||
ret = remoteIO(st->conn, priv, 0, thiscall);
|
ret = remoteIO(st->conn, priv, 0, thiscall);
|
||||||
|
ignore_value(virCondDestroy(&thiscall->cond));
|
||||||
VIR_FREE(thiscall);
|
VIR_FREE(thiscall);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return -1;
|
return -1;
|
||||||
@ -8617,6 +8618,7 @@ remoteStreamPacket(virStreamPtr st,
|
|||||||
|
|
||||||
error:
|
error:
|
||||||
xdr_destroy (&xdr);
|
xdr_destroy (&xdr);
|
||||||
|
ignore_value(virCondDestroy(&thiscall->cond));
|
||||||
VIR_FREE(thiscall);
|
VIR_FREE(thiscall);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@ -8746,6 +8748,7 @@ remoteStreamRecv(virStreamPtr st,
|
|||||||
}
|
}
|
||||||
|
|
||||||
ret = remoteIO(st->conn, priv, 0, thiscall);
|
ret = remoteIO(st->conn, priv, 0, thiscall);
|
||||||
|
ignore_value(virCondDestroy(&thiscall->cond));
|
||||||
VIR_FREE(thiscall);
|
VIR_FREE(thiscall);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
@ -9719,6 +9722,7 @@ prepareCall(struct private_data *priv,
|
|||||||
|
|
||||||
error:
|
error:
|
||||||
xdr_destroy (&xdr);
|
xdr_destroy (&xdr);
|
||||||
|
ignore_value(virCondDestroy(&rv->cond));
|
||||||
VIR_FREE(rv);
|
VIR_FREE(rv);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@ -10818,6 +10822,7 @@ call (virConnectPtr conn, struct private_data *priv,
|
|||||||
}
|
}
|
||||||
|
|
||||||
rv = remoteIO(conn, priv, flags, thiscall);
|
rv = remoteIO(conn, priv, flags, thiscall);
|
||||||
|
ignore_value(virCondDestroy(&thiscall->cond));
|
||||||
VIR_FREE(thiscall);
|
VIR_FREE(thiscall);
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user