multipath: close sysfs file after setting value
authorBenjamin Marzinski <bmarzins@redhat.com>
Thu, 20 May 2010 03:59:57 +0000 (22:59 -0500)
committerChristophe Varoqui <christophe.varoqui@opensvc.com>
Thu, 20 May 2010 04:50:40 +0000 (06:50 +0200)
We need to close the sysfs file after setting its value.

Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
libmultipath/sysfs.c

index b05a274..efbe7c1 100644 (file)
@@ -407,6 +407,7 @@ sysfs_attr_set_value(const char *devpath, const char *attr_name,
                    path_full, ret);
                ret = -1;
        }
+       close(fd);
 out:
        return ret;
 }