]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
sysfs: free used resources
authorDavidlohr Bueso <dave@gnu.org>
Sun, 24 Jul 2011 15:22:52 +0000 (11:22 -0400)
committerKarel Zak <kzak@redhat.com>
Tue, 26 Jul 2011 09:58:38 +0000 (11:58 +0200)
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@gnu.org>
lib/sysfs.c

index b9ddc67f5e9eb835e681a611df1ddd2045cb9a13..7bcdabae282add14df98c791a0228075fdfdc4ed 100644 (file)
@@ -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