]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - cups/ppd-mark.c
Update adminutil.c
[thirdparty/cups.git] / cups / ppd-mark.c
index eb476771e949aac5373f10644b766cc32966090e..7ec0df473951a40cfc5beb0e12fbf656e8cd149e 100644 (file)
@@ -1,8 +1,8 @@
 /*
  * Option marking routines for CUPS.
  *
- * Copyright 2007-2017 by Apple Inc.
- * Copyright 1997-2007 by Easy Software Products, all rights reserved.
+ * Copyright © 2007-2019 by Apple Inc.
+ * Copyright © 1997-2007 by Easy Software Products, all rights reserved.
  *
  * Licensed under Apache License v2.0.  See the file "LICENSE" for more
  * information.
@@ -851,6 +851,9 @@ ppd_mark_option(ppd_file_t *ppd,    /* I - PPD file */
 
         switch (cparam->type)
        {
+         case PPD_CUSTOM_UNKNOWN :
+             break;
+
          case PPD_CUSTOM_CURVE :
          case PPD_CUSTOM_INVCURVE :
          case PPD_CUSTOM_REAL :
@@ -886,9 +889,9 @@ ppd_mark_option(ppd_file_t *ppd,    /* I - PPD file */
          case PPD_CUSTOM_PASSWORD :
          case PPD_CUSTOM_STRING :
              if (cparam->current.custom_string)
-               _cupsStrFree(cparam->current.custom_string);
+               free(cparam->current.custom_string);
 
-             cparam->current.custom_string = _cupsStrAlloc(choice + 7);
+             cparam->current.custom_string = strdup(choice + 7);
              break;
        }
       }
@@ -928,6 +931,9 @@ ppd_mark_option(ppd_file_t *ppd,    /* I - PPD file */
 
        switch (cparam->type)
        {
+         case PPD_CUSTOM_UNKNOWN :
+             break;
+
          case PPD_CUSTOM_CURVE :
          case PPD_CUSTOM_INVCURVE :
          case PPD_CUSTOM_REAL :
@@ -963,9 +969,9 @@ ppd_mark_option(ppd_file_t *ppd,    /* I - PPD file */
          case PPD_CUSTOM_PASSWORD :
          case PPD_CUSTOM_STRING :
              if (cparam->current.custom_string)
-               _cupsStrFree(cparam->current.custom_string);
+               free(cparam->current.custom_string);
 
-             cparam->current.custom_string = _cupsStrRetain(val->value);
+             cparam->current.custom_string = strdup(val->value);
              break;
        }
       }