You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@guacamole.apache.org by mj...@apache.org on 2016/03/20 03:25:12 UTC
[42/50] incubator-guacamole-server git commit: GUAC-1164: Ensure
elements of SVC names array are freed.
GUAC-1164: Ensure elements of SVC names array are freed.
Project: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/commit/176ff96a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/tree/176ff96a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/diff/176ff96a
Branch: refs/heads/master
Commit: 176ff96a26c08c2adc3ee1b3772d9ad11cee736e
Parents: 3614c48
Author: Michael Jumper <mi...@guac-dev.org>
Authored: Thu Mar 17 15:54:15 2016 -0700
Committer: Michael Jumper <mi...@guac-dev.org>
Committed: Thu Mar 17 15:54:15 2016 -0700
----------------------------------------------------------------------
src/protocols/rdp/rdp_settings.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/blob/176ff96a/src/protocols/rdp/rdp_settings.c
----------------------------------------------------------------------
diff --git a/src/protocols/rdp/rdp_settings.c b/src/protocols/rdp/rdp_settings.c
index 133da61..dddae74 100644
--- a/src/protocols/rdp/rdp_settings.c
+++ b/src/protocols/rdp/rdp_settings.c
@@ -765,7 +765,19 @@ void guac_rdp_settings_free(guac_rdp_settings* settings) {
free(settings->username);
/* 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
/* Free SFTP settings */