resources: Init refcount to 1
authorChristian Persch <chpe@gnome.org>
Sun, 5 Feb 2012 15:37:36 +0000 (16:37 +0100)
committerChristian Persch <chpe@gnome.org>
Sun, 5 Feb 2012 18:57:10 +0000 (19:57 +0100)
commit877fe6fb524df8478c963342b7948aa3aa55f25e
treecea9466581bf3b1db0b2164d6e50a0c8dca48d08
parent30e9cccb85bd6f398ce1f17d9a8eae98f4c2430a
resources: Init refcount to 1

This bug was exposed by fixing the following leak in the resources test:

==29204== 11,456 (84 direct, 11,372 indirect) bytes in 1 blocks are definitely lost in loss record 859 of 861
==29204==    at 0x402AD89: malloc (vg_replace_malloc.c:236)
==29204==    by 0x4084724: standard_malloc (gmem.c:85)
==29204==    by 0x40847C7: g_malloc (gmem.c:159)
==29204==    by 0x409B1E1: g_slice_alloc (gslice.c:1003)
==29204==    by 0x409B227: g_slice_alloc0 (gslice.c:1029)
==29204==    by 0x41936CF: g_type_create_instance (gtype.c:1872)
==29204==    by 0x417CCC9: g_object_constructor (gobject.c:1839)
==29204==    by 0x417C6F4: g_object_newv (gobject.c:1703)
==29204==    by 0x417CC5A: g_object_new_valist (gobject.c:1820)
==29204==    by 0x417C1DB: g_object_new (gobject.c:1535)
==29204==    by 0x41E5E29: g_converter_input_stream_new (gconverterinputstream.c:204)
==29204==    by 0x4228D38: g_resource_open_stream (gresource.c:363)
gio/gresource.c