Signed-off-by: Jeremy White <jwh...@codeweavers.com> --- src/options.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/options.c b/src/options.c index 0d3138d0..cf75e54e 100644 --- a/src/options.c +++ b/src/options.c @@ -355,7 +355,9 @@ int options_parse_arguments(int argc, char *argv[], options_t *options) if (rc == 0) { if (optind >= argc) { /* Default */ - options->listen = strdup("5900"); + if (!options->listen) { + options->listen = strdup("5900"); + } } else if (optind < (argc - 1)) { fprintf(stderr, "Error: too many arguments\n"); rc = X11SPICE_ERR_BADARGS; -- 2.11.0 _______________________________________________ Spice-devel mailing list Spice-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/spice-devel