Skip to contentSkip to conversation

Leaking of xs_fd fixed in Xenstore

PATCH In review Lasya 2 participants 2 messages Oct 27, 2015 – Oct 28, 2015

lore
Share & tools
lore

Lasya

author
#0 lore raw

PATCH v3 1/1 Leaking of xs_fd fixed in Xenstore

The success path isn't closed xs_fd in build function in init-xenstore-domain.c . Added that line before return 0.

---
 tools/xenstore/init-xenstore-domain.c | 1 +
 1 file changed, 1 insertion(+)
tools/xenstore/init-xenstore-domain.c +1 -0
index 82ddabb..0397431 100644
@@ -75,6 +75,7 @@ static int build(xc_interface *xch, int argc, char** argv)
 	rv = xc_domain_unpause(xch, domid);
 	if (rv) goto err;
 
+	close(xs_fd);
 	return 0;
 
 err:
Signature · 1 line
1.9.1
#1 lore raw
Quoted 3 lines · Lasya

The success path isn't closed xs_fd in build function in init -xenstore-domain.c . Added that line before return 0.

All that I said for the other patch, applies here too.

Also, the two patches are related. I think it would be good if you try sending them as a patch series, rather than as two independent patches.

Thanks and Regards,
Dario

Signature · 4 lines
<<This happens because I choose it to happen!>> (Raistlin Majere)
-----------------------------------------------------------------
Dario Faggioli, Ph.D, http://about.me/dario.faggioli
Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel