gtestutils: Don’t free unassigned variables in an error path

If the stream is invalid, msg.nums and msg.strings have not been
assigned to, so don’t free them.

Coverity issue: #1159505
gresource-tool: Fix an FD leak in an error path

Coverity issues: #1214054, #1214055, #1214056
gsocket: Add missing preconditions to g_socket_send_message()

https://bugzilla.gnome.org/show_bug.cgi?id=730190