[easytag] Add a comment about id3_file_fdopen()
- From: David King <davidk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [easytag] Add a comment about id3_file_fdopen()
- Date: Wed, 5 Feb 2014 17:42:07 +0000 (UTC)
commit ebb19c7ed0f60156224c01bdca43a2212d933617
Author: David King <amigadave amigadave com>
Date: Mon Feb 3 16:28:23 2014 +0000
Add a comment about id3_file_fdopen()
Passing a file descriptor to id3_file_fdopen() causes it to take
ownership of the descriptor, so that only a matching id3_file_close() is
required to close the resulting file.
Found with Coverity (CID 1163335).
src/id3v24_tag.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/src/id3v24_tag.c b/src/id3v24_tag.c
index c02d08c..5d7bbcd 100644
--- a/src/id3v24_tag.c
+++ b/src/id3v24_tag.c
@@ -191,6 +191,7 @@ gboolean Id3tag_Read_File_Tag (const gchar *filename, File_Tag *FileTag)
g_free(string1);
+ /* Takes ownership of the file descriptor on success. */
if ((file = id3_file_fdopen(tmpfile, ID3_FILE_MODE_READONLY)) == NULL)
{
close(tmpfile);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]