Skip to content

GTlsConnectionBase: plug an error leaked

Claudio Saavedra requested to merge gtlsconnection-error_leak into master

Not all code paths take care of either propagating or clearing my_error, so it gets leaked. Fix that in a non-intrusive way.

Valgrind output:

==3368== 48 (16 direct, 32 indirect) bytes in 1 blocks are definitely lost in loss record 1,490 of 2,432
==3368==    at 0x483577F: malloc (vg_replace_malloc.c:309)
==3368==    by 0x4961444: g_malloc (gmem.c:99)
==3368==    by 0x497C6E6: g_slice_alloc (gslice.c:1024)
==3368==    by 0x493FAC3: g_error_new_valist (gerror.c:419)
==3368==    by 0x493FEC8: g_set_error (gerror.c:593)
==3368==    by 0x4B58986: g_socket_send_with_timeout (gsocket.c:3396)
==3368==    by 0x4B58A57: g_socket_send_with_blocking (gsocket.c:3473)
==3368==    by 0x4B64FE1: g_socket_output_stream_write (gsocketoutputstream.c:131)
==3368==    by 0x4B3EFD4: g_output_stream_write (goutputstream.c:242)
==3368==    by 0x4B46A29: g_pollable_stream_write (gpollableutils.c:250)
==3368==    by 0x4CC22AE: g_tls_connection_gnutls_push_func (gtlsconnection-gnutls.c:590)

Merge request reports