diff options
author | Daniel Teichmann <daniel.teichmann@das-netzwerkteam.de> | 2021-09-28 14:06:36 +0300 |
---|---|---|
committer | Daniel Teichmann <daniel.teichmann@das-netzwerkteam.de> | 2021-10-01 15:17:27 +0300 |
commit | a8f4833c20d781f9ffd374de673d82a0f602b465 (patch) | |
tree | 0247c162df6f9ed05face637239940ac14e8ef03 /plugins | |
parent | fb31daea30419b2d326aafa466f03469a582b03d (diff) |
x2go_plugin.c: Allow data without any delimiters; Fix missing '!' in NULL check.
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/x2go/x2go_plugin.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/plugins/x2go/x2go_plugin.c b/plugins/x2go/x2go_plugin.c index 5383d0331..28c3c9e2c 100644 --- a/plugins/x2go/x2go_plugin.c +++ b/plugins/x2go/x2go_plugin.c @@ -172,14 +172,10 @@ static gchar** remmina_plugin_x2go_split_string(gchar* data, pch = strchr(pch + 1, delim); } - if (delim_occurence <= 0) { - return NULL; - } - gchar **returning_string_list = NULL; // We are just storing gchar pointers not actual gchars. returning_string_list = malloc(sizeof(gchar*) * (delim_occurence + 1)); - if (returning_string_list) { + if (!returning_string_list) { REMMINA_PLUGIN_CRITICAL("malloc failed to reserve memory!"); return NULL; } |