diff -rup gtk-vnc-0.4.1.orig/src/vncconnection.c gtk-vnc-0.4.1.new/src/vncconnection.c --- gtk-vnc-0.4.1.orig/src/vncconnection.c 2010-07-14 11:28:15.000000000 +0100 +++ gtk-vnc-0.4.1.new/src/vncconnection.c 2010-08-05 14:56:40.403911911 +0100 @@ -4191,7 +4191,10 @@ static void vnc_connection_close(VncConn priv->name = NULL; } - g_free (priv->xmit_buffer); + if (priv->xmit_buffer) { + g_free(priv->xmit_buffer); + priv->xmit_buffer = NULL; + } if (priv->cred_username) { g_free(priv->cred_username);