X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=cups%2Fppd-mark.c;h=7ec0df473951a40cfc5beb0e12fbf656e8cd149e;hb=5129a91c541b5636aab2685a4bb7accd1eca166f;hp=eb476771e949aac5373f10644b766cc32966090e;hpb=fb863569eb4f51ae62a066dc8049d3ffc0efb0bb;p=thirdparty%2Fcups.git diff --git a/cups/ppd-mark.c b/cups/ppd-mark.c index eb476771e..7ec0df473 100644 --- a/cups/ppd-mark.c +++ b/cups/ppd-mark.c @@ -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; } }