Fixes socket leak that might cause denial of serivce. https://bugzilla.redhat.com/show_bug.cgi?id=1523547 Signed-off-by: Baruch Siach <baruch@tkos.co.il> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>