GUAC-1389: Only free dest_host if repeater is available.

This commit is contained in:
Michael Jumper 2016-03-03 13:06:31 -08:00
parent 05e8bf3195
commit 38f1e87334

View File

@ -387,10 +387,14 @@ void guac_vnc_settings_free(guac_vnc_settings* settings) {
/* Free settings strings */
free(settings->clipboard_encoding);
free(settings->dest_host);
free(settings->encodings);
free(settings->hostname);
#ifdef ENABLE_VNC_REPEATER
/* Free VNC repeater settings */
free(settings->dest_host);
#endif
#ifdef ENABLE_COMMON_SSH
/* Free SFTP settings */
free(settings->sftp_directory);