]> git.refcnt.org Git - colorize.git/commitdiff
Don't xstrdup() optarg
authorSteven Schubiger <stsc@refcnt.org>
Sun, 16 Apr 2017 20:29:22 +0000 (22:29 +0200)
committerSteven Schubiger <stsc@refcnt.org>
Sun, 16 Apr 2017 20:29:22 +0000 (22:29 +0200)
colorize.c

index 0cfbaad0862809baf37a7e3a0037748e557d87f8..7683e1c70c6137f0ecf316fe3fd31f14e2fbff4c 100644 (file)
@@ -369,13 +369,9 @@ process_opts (int argc, char **argv)
             case 0: /* long opts */
               switch (opt_type)
                 {
-                  case OPT_ATTR: {
-                    char *opt;
-                    opt = xstrdup (optarg);
-                    process_opt_attr (opt);
-                    free (opt);
+                  case OPT_ATTR:
+                    process_opt_attr (optarg);
                     break;
-                  }
                   case OPT_CLEAN:
                     clean = true;
                     break;