diff options
Diffstat (limited to 'base')
-rw-r--r-- | base/gscparam.c | 10 | ||||
-rw-r--r-- | base/gsparam.h | 3 |
2 files changed, 11 insertions, 2 deletions
diff --git a/base/gscparam.c b/base/gscparam.c index b39344172..1581ac537 100644 --- a/base/gscparam.c +++ b/base/gscparam.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2001-2021 Artifex Software, Inc. +/* Copyright (C) 2001-2023 Artifex Software, Inc. All Rights Reserved. This software is provided AS-IS with no warranty, either express or @@ -128,6 +128,14 @@ gs_c_param_list_alloc(gs_memory_t *mem, client_name_t cname) return gs_alloc_struct(mem, gs_c_param_list, &st_c_param_list, cname); } +void gs_c_param_list_free(gs_memory_t *mem, gs_c_param_list *plist, client_name_t cname) +{ + if (plist == NULL) + return; + gs_c_param_list_release(plist); + gs_free_object(mem, plist, cname); +} + static gs_c_param * c_param_find(const gs_c_param_list *plist, gs_param_name pkey, bool any) { diff --git a/base/gsparam.h b/base/gsparam.h index df3b1c03d..01b070f22 100644 --- a/base/gsparam.h +++ b/base/gsparam.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2001-2021 Artifex Software, Inc. +/* Copyright (C) 2001-2023 Artifex Software, Inc. All Rights Reserved. This software is provided AS-IS with no warranty, either express or @@ -570,6 +570,7 @@ void gs_c_param_list_write(gs_c_param_list *, gs_memory_t *); void gs_c_param_list_write_more(gs_c_param_list *); /* switch back to writing, no init */ void gs_c_param_list_read(gs_c_param_list *); /* switch to reading */ void gs_c_param_list_release(gs_c_param_list *); +void gs_c_param_list_free(gs_memory_t *, gs_c_param_list *, client_name_t); /* Given a string to parse (a list of key/value pairs), parse it and add * what we find to the supplied param list. Note that p is corrupted |