From 693cc223a8b12af93874f23aa514d8e9c60ff195 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20Courr=C3=A8ges-Anglas?= Date: Wed, 5 Mar 2014 03:04:01 +0100 Subject: Don't dup args passed on the cli, we don't mangle them. --- src/main.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/main.c b/src/main.c index a64d284..f695df9 100644 --- a/src/main.c +++ b/src/main.c @@ -655,8 +655,7 @@ main (int argc, char *argv[]) cmd_count++; break; case 'd': - free (display); - display = xstrdup (optarg); + display = optarg; break; case 's': screen_arg = 1; @@ -666,8 +665,7 @@ main (int argc, char *argv[]) interactive = 1; break; case 'f': - free (alt_rcfile); - alt_rcfile = xstrdup (optarg); + alt_rcfile = optarg; break; default: @@ -781,7 +779,6 @@ main (int argc, char *argv[]) if (read_startup_files (alt_rcfile) == -1) return EXIT_FAILURE; - free (alt_rcfile); /* Indicate to the user that ratpoison has booted. */ if (defaults.startup_message) -- cgit v1.2.3