-
David Zeuthen authored
The messages array was not reallocated correctly because it was using malloc instead of realloc. Also, if the user requested messages but none were received we would segfault. Rewrite the code to fix this and, for better readability, use GPtrArray instead of rolling our own. Also make the docs mention that the user need to free the returned GSocketControlMessage objects using g_object_unref(). Clarify that *messages may be set to %NULL if there are no messages (this will save pointless allocs of arrays). Finally, the Win32 version didn't set messages to the expected value. https://bugzilla.gnome.org/show_bug.cgi?id=616877 Signed-off-by: David Zeuthen <davidz@redhat.com>
3ceddd74