mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-19 15:18:55 +02:00
Close the file descriptor. (#75507, Matthias Clasen)
Wed Mar 20 11:17:32 2002 Owen Taylor <otaylor@redhat.com> * glib/gfileutils.c (get_contents_regfile): Close the file descriptor. (#75507, Matthias Clasen)
This commit is contained in:
@@ -1,3 +1,8 @@
|
|||||||
|
Wed Mar 20 11:17:32 2002 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* glib/gfileutils.c (get_contents_regfile): Close the
|
||||||
|
file descriptor. (#75507, Matthias Clasen)
|
||||||
|
|
||||||
Wed Mar 20 11:00:59 2002 Owen Taylor <otaylor@redhat.com>
|
Wed Mar 20 11:00:59 2002 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* configure.in: Use $PKG_CONFIG, not pkg-config.
|
* configure.in: Use $PKG_CONFIG, not pkg-config.
|
||||||
|
@@ -1,3 +1,8 @@
|
|||||||
|
Wed Mar 20 11:17:32 2002 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* glib/gfileutils.c (get_contents_regfile): Close the
|
||||||
|
file descriptor. (#75507, Matthias Clasen)
|
||||||
|
|
||||||
Wed Mar 20 11:00:59 2002 Owen Taylor <otaylor@redhat.com>
|
Wed Mar 20 11:00:59 2002 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* configure.in: Use $PKG_CONFIG, not pkg-config.
|
* configure.in: Use $PKG_CONFIG, not pkg-config.
|
||||||
|
@@ -1,3 +1,8 @@
|
|||||||
|
Wed Mar 20 11:17:32 2002 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* glib/gfileutils.c (get_contents_regfile): Close the
|
||||||
|
file descriptor. (#75507, Matthias Clasen)
|
||||||
|
|
||||||
Wed Mar 20 11:00:59 2002 Owen Taylor <otaylor@redhat.com>
|
Wed Mar 20 11:00:59 2002 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* configure.in: Use $PKG_CONFIG, not pkg-config.
|
* configure.in: Use $PKG_CONFIG, not pkg-config.
|
||||||
|
@@ -1,3 +1,8 @@
|
|||||||
|
Wed Mar 20 11:17:32 2002 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* glib/gfileutils.c (get_contents_regfile): Close the
|
||||||
|
file descriptor. (#75507, Matthias Clasen)
|
||||||
|
|
||||||
Wed Mar 20 11:00:59 2002 Owen Taylor <otaylor@redhat.com>
|
Wed Mar 20 11:00:59 2002 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* configure.in: Use $PKG_CONFIG, not pkg-config.
|
* configure.in: Use $PKG_CONFIG, not pkg-config.
|
||||||
|
@@ -1,3 +1,8 @@
|
|||||||
|
Wed Mar 20 11:17:32 2002 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* glib/gfileutils.c (get_contents_regfile): Close the
|
||||||
|
file descriptor. (#75507, Matthias Clasen)
|
||||||
|
|
||||||
Wed Mar 20 11:00:59 2002 Owen Taylor <otaylor@redhat.com>
|
Wed Mar 20 11:00:59 2002 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* configure.in: Use $PKG_CONFIG, not pkg-config.
|
* configure.in: Use $PKG_CONFIG, not pkg-config.
|
||||||
|
@@ -1,3 +1,8 @@
|
|||||||
|
Wed Mar 20 11:17:32 2002 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* glib/gfileutils.c (get_contents_regfile): Close the
|
||||||
|
file descriptor. (#75507, Matthias Clasen)
|
||||||
|
|
||||||
Wed Mar 20 11:00:59 2002 Owen Taylor <otaylor@redhat.com>
|
Wed Mar 20 11:00:59 2002 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* configure.in: Use $PKG_CONFIG, not pkg-config.
|
* configure.in: Use $PKG_CONFIG, not pkg-config.
|
||||||
|
@@ -1,3 +1,8 @@
|
|||||||
|
Wed Mar 20 11:17:32 2002 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* glib/gfileutils.c (get_contents_regfile): Close the
|
||||||
|
file descriptor. (#75507, Matthias Clasen)
|
||||||
|
|
||||||
Wed Mar 20 11:00:59 2002 Owen Taylor <otaylor@redhat.com>
|
Wed Mar 20 11:00:59 2002 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* configure.in: Use $PKG_CONFIG, not pkg-config.
|
* configure.in: Use $PKG_CONFIG, not pkg-config.
|
||||||
|
@@ -402,7 +402,7 @@ get_contents_regfile (const gchar *filename,
|
|||||||
_("Could not allocate %lu bytes to read file \"%s\""),
|
_("Could not allocate %lu bytes to read file \"%s\""),
|
||||||
(gulong) alloc_size, filename);
|
(gulong) alloc_size, filename);
|
||||||
|
|
||||||
return FALSE;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
bytes_read = 0;
|
bytes_read = 0;
|
||||||
@@ -426,7 +426,7 @@ get_contents_regfile (const gchar *filename,
|
|||||||
_("Failed to read from file '%s': %s"),
|
_("Failed to read from file '%s': %s"),
|
||||||
filename, g_strerror (errno));
|
filename, g_strerror (errno));
|
||||||
|
|
||||||
return FALSE;
|
goto error;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (rc == 0)
|
else if (rc == 0)
|
||||||
@@ -442,7 +442,15 @@ get_contents_regfile (const gchar *filename,
|
|||||||
|
|
||||||
*contents = buf;
|
*contents = buf;
|
||||||
|
|
||||||
|
close (fd);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
|
error:
|
||||||
|
|
||||||
|
close (fd);
|
||||||
|
|
||||||
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
|
Reference in New Issue
Block a user