Commit 647e7fa3 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Fix a theoretical resource leak spotted by Coverity: If we are out of

malloc space: we leak memory while we collapse.
parent e726134e
......@@ -288,8 +288,10 @@ VDP_gunzip(struct req *req, enum vdp_action act, void **priv,
if (act == VDP_INIT) {
vg = VGZ_NewUngzip(req->vsl, "U D -");
AN(vg);
if (vgz_getmbuf(vg))
if (vgz_getmbuf(vg)) {
(void)VGZ_Destroy(&vg);
return (-1);
}
VGZ_Obuf(vg, vg->m_buf, vg->m_sz);
*priv = vg;
......
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