GUAC-1164: Ensure elements of SVC names array are freed.
This commit is contained in:
parent
3614c48240
commit
176ff96a26
@ -765,7 +765,19 @@ void guac_rdp_settings_free(guac_rdp_settings* settings) {
|
|||||||
free(settings->username);
|
free(settings->username);
|
||||||
|
|
||||||
/* Free channel name array */
|
/* Free channel name array */
|
||||||
free(settings->svc_names);
|
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);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef ENABLE_COMMON_SSH
|
#ifdef ENABLE_COMMON_SSH
|
||||||
/* Free SFTP settings */
|
/* Free SFTP settings */
|
||||||
|
Loading…
Reference in New Issue
Block a user