username has to be allocated since we might free it
authorDavid Woodhouse <David.Woodhouse@intel.com>
Wed, 1 Oct 2008 12:53:47 +0000 (13:53 +0100)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Wed, 1 Oct 2008 12:53:47 +0000 (13:53 +0100)
main.c

diff --git a/main.c b/main.c
index 825679f..ee72f4c 100644 (file)
--- a/main.c
+++ b/main.c
@@ -160,7 +160,7 @@ int main(int argc, char **argv)
                        vpninfo->tpm = 1;
                        break;
                case 'u':
-                       vpninfo->username = optarg;
+                       vpninfo->username = strdup(optarg);
                        break;
                case 'v':
                        verbose = 1;