[libmultipath] plug leak in discover.c:syfs_get_*()
authorChristophe Varoqui <root@xa-s05.(none)>
Sat, 21 Jan 2006 10:26:58 +0000 (11:26 +0100)
committerChristophe Varoqui <root@xa-s05.(none)>
Sat, 21 Jan 2006 10:26:58 +0000 (11:26 +0100)
libmultipath/discovery.c

index 27429b6..aa71afd 100644 (file)
@@ -167,6 +167,7 @@ sysfs_get_##fname (char * sysfs_path, char * dev, char * buff, int len) \
 \
        strncpy(buff, attr->value, attr->len - 1); \
        buff[attr->len - 1] = '\0'; \
+       sysfs_close_attribute(attr); \
        return 0; \
 out: \
        sysfs_close_attribute(attr); \