From: Davidlohr Bueso <dave@gnu.org>
To: Karel Zak <kzak@redhat.com>
Cc: util-linux <util-linux@vger.kernel.org>
Subject: [PATCH] [LIB] sysfs: free used resources
Date: Sun, 24 Jul 2011 18:50:38 -0400 [thread overview]
Message-ID: <1311547838.3367.2.camel@offbook> (raw)
From: Davidlohr Bueso <dave@gnu.org>
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@gnu.org>
---
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
next reply other threads:[~2011-07-24 22:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-24 22:50 Davidlohr Bueso [this message]
2011-07-26 10:13 ` [PATCH] [LIB] sysfs: free used resources Karel Zak
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1311547838.3367.2.camel@offbook \
--to=dave@gnu.org \
--cc=kzak@redhat.com \
--cc=util-linux@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox