Set variable to NULL to prevent double free.
authorArmin Novak <armin.novak@thincast.com>
Mon, 7 Mar 2016 12:12:38 +0000 (13:12 +0100)
committerArmin Novak <armin.novak@thincast.com>
Mon, 7 Mar 2016 12:12:38 +0000 (13:12 +0100)
client/common/cmdline.c

index 6092947..9ffa059 100644 (file)
@@ -1475,6 +1475,8 @@ int freerdp_client_settings_parse_command_line_arguments(rdpSettings* settings,
                                CommandLineSwitchCase(arg, "v")
                {
                        free (settings->ServerHostname);
+                       settings->ServerHostname = NULL;
+
                        p = strchr(arg->Value, '[');
                        /* ipv4 */
                        if (!p)