2005-04-05 Matthias Clasen <mclasen@redhat.com>
* glib/gfileutils.c (get_contents_stdio): Avoid memory
leaks in borderline cases. (#172612, Morten Welinder)
+2005-04-05 Matthias Clasen <mclasen@redhat.com>
+
+ * glib/gfileutils.c (get_contents_stdio): Avoid memory
+ leaks in borderline cases. (#172612, Morten Welinder)
+
2005-04-04 Matthias Clasen <mclasen@redhat.com>
* glib/gconvert.c: Clarify docs in some places. (#172404,
2005-04-04 Matthias Clasen <mclasen@redhat.com>
* glib/gconvert.c: Clarify docs in some places. (#172404,
+2005-04-05 Matthias Clasen <mclasen@redhat.com>
+
+ * glib/gfileutils.c (get_contents_stdio): Avoid memory
+ leaks in borderline cases. (#172612, Morten Welinder)
+
2005-04-04 Matthias Clasen <mclasen@redhat.com>
* glib/gconvert.c: Clarify docs in some places. (#172404,
2005-04-04 Matthias Clasen <mclasen@redhat.com>
* glib/gconvert.c: Clarify docs in some places. (#172404,
+2005-04-05 Matthias Clasen <mclasen@redhat.com>
+
+ * glib/gfileutils.c (get_contents_stdio): Avoid memory
+ leaks in borderline cases. (#172612, Morten Welinder)
+
2005-04-04 Matthias Clasen <mclasen@redhat.com>
* glib/gconvert.c: Clarify docs in some places. (#172404,
2005-04-04 Matthias Clasen <mclasen@redhat.com>
* glib/gconvert.c: Clarify docs in some places. (#172404,
+2005-04-05 Matthias Clasen <mclasen@redhat.com>
+
+ * glib/gfileutils.c (get_contents_stdio): Avoid memory
+ leaks in borderline cases. (#172612, Morten Welinder)
+
2005-04-04 Matthias Clasen <mclasen@redhat.com>
* glib/gconvert.c: Clarify docs in some places. (#172404,
2005-04-04 Matthias Clasen <mclasen@redhat.com>
* glib/gconvert.c: Clarify docs in some places. (#172404,
gchar *str = NULL;
size_t total_bytes = 0;
size_t total_allocated = 0;
gchar *str = NULL;
size_t total_bytes = 0;
size_t total_allocated = 0;
else
total_allocated = MIN (bytes + 1, sizeof (buf));
else
total_allocated = MIN (bytes + 1, sizeof (buf));
- str = g_try_realloc (str, total_allocated);
+ tmp = g_try_realloc (str, total_allocated);
{
g_set_error (error,
G_FILE_ERROR,
{
g_set_error (error,
G_FILE_ERROR,
+ if (total_allocated == 0)
str = g_new (gchar, 1);
str[total_bytes] = '\0';
str = g_new (gchar, 1);
str[total_bytes] = '\0';