[PATCH] [LIB] sysfs: free used resources

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Davidlohr Bueso <dave@xxxxxxx>
Date: Sun, 24 Jul 2011 11:22:52 -0400

In the sysfs lib example, we should be using sysfs_deinit() to free used resources and for correct usage.

Signed-off-by: Davidlohr Bueso <dave@xxxxxxx>
---
 lib/sysfs.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/lib/sysfs.c b/lib/sysfs.c
index b9ddc67..7bcdaba 100644
--- a/lib/sysfs.c
+++ b/lib/sysfs.c
@@ -488,6 +488,7 @@ int main(int argc, char *argv[])
 
 	printf("DEVNAME: %s\n", sysfs_get_devname(&cxt, path, sizeof(path)));
 
+	sysfs_deinit(&cxt);
 	return EXIT_SUCCESS;
 }
 #endif
-- 
1.7.4.1



--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux