opkg: strdup the command line arguments so we can free the struct properly later
authorticktock35 <ticktock35@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>
Mon, 15 Dec 2008 05:19:10 +0000 (05:19 +0000)
committerticktock35 <ticktock35@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>
Mon, 15 Dec 2008 05:19:10 +0000 (05:19 +0000)
git-svn-id: http://opkg.googlecode.com/svn/trunk@117 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358

libopkg/args.c

index 6143f11..495f1a8 100644 (file)
@@ -149,14 +149,14 @@ int args_parse(args_t *args, int argc, char *argv[])
               args->query_all = 1;
               break;
          case 'd':
-              args->dest = optarg;
+              args->dest = strdup (optarg);
               break;
          case 'f':
               free(args->conf_file);
               args->conf_file = strdup(optarg);
               break;
          case 'o':
-              args->offline_root = optarg;
+              args->offline_root = strdup (optarg);
               break;
          case 'n':
               args->noaction = 1;