Skip to contentSkip to conversation

multipath: close sysfs file after setting value

PATCH New Benjamin Marzinski 1 participant 1 message May 20, 2010 Device mapper

lore
Share & tools
lore

Benjamin Marzinski

author maintainer
#0 lore raw

PATCH 1/1 multipath: close sysfs file after setting value

We need to close the sysfs file after setting its value.

---
 libmultipath/sysfs.c |    1 +
 1 file changed, 1 insertion(+)
libmultipath/sysfs.c +1 -0
Index: multipath-tools/libmultipath/sysfs.c
===================================================================
@@ -407,6 +407,7 @@ sysfs_attr_set_value(const char *devpath
 		    path_full, ret);
 		ret = -1;
 	}
+	close(fd);
 out:
 	return ret;
 }