Commit eccf6b57 authored by Owen Taylor's avatar Owen Taylor Committed by Owen Taylor

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)
parent a841dbd7
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>
* configure.in: Use $PKG_CONFIG, not pkg-config.
......
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>
* configure.in: Use $PKG_CONFIG, not pkg-config.
......
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>
* configure.in: Use $PKG_CONFIG, not pkg-config.
......
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>
* configure.in: Use $PKG_CONFIG, not pkg-config.
......
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>
* configure.in: Use $PKG_CONFIG, not pkg-config.
......
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>
* configure.in: Use $PKG_CONFIG, not pkg-config.
......
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>
* 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\""),
(gulong) alloc_size, filename);
return FALSE;
goto error;
}
bytes_read = 0;
......@@ -426,7 +426,7 @@ get_contents_regfile (const gchar *filename,
_("Failed to read from file '%s': %s"),
filename, g_strerror (errno));
return FALSE;
goto error;
}
}
else if (rc == 0)
......@@ -442,7 +442,15 @@ get_contents_regfile (const gchar *filename,
*contents = buf;
close (fd);
return TRUE;
error:
close (fd);
return FALSE;
}
static gboolean
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment