GUAC-1164: Ensure elements of SVC names array are freed.

This commit is contained in:
Michael Jumper 2016-03-17 15:54:15 -07:00
parent 3614c48240
commit 176ff96a26

View File

@ -765,8 +765,20 @@ void guac_rdp_settings_free(guac_rdp_settings* settings) {
free(settings->username); free(settings->username);
/* Free channel name array */ /* Free channel name array */
if (settings->svc_names != NULL) {
/* Free all elements of array */
char** current = &(settings->svc_names[0]);
while (*current != NULL) {
free(*current);
current++;
}
/* Free array itself */
free(settings->svc_names); free(settings->svc_names);
}
#ifdef ENABLE_COMMON_SSH #ifdef ENABLE_COMMON_SSH
/* Free SFTP settings */ /* Free SFTP settings */
free(settings->sftp_directory); free(settings->sftp_directory);