summaryrefslogtreecommitdiff
path: root/src/libical/icallangbind.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libical/icallangbind.c')
-rw-r--r--src/libical/icallangbind.c26
1 files changed, 9 insertions, 17 deletions
diff --git a/src/libical/icallangbind.c b/src/libical/icallangbind.c
index 859d6c8e..03a973bb 100644
--- a/src/libical/icallangbind.c
+++ b/src/libical/icallangbind.c
@@ -2,18 +2,10 @@
FILE: icallangbind.c
CREATOR: eric 15 dec 2000
- (C) COPYRIGHT 1999 Eric Busboom <eric@civicknowledge.com>
+ SPDX-FileCopyrightText: 1999 Eric Busboom <eric@civicknowledge.com>
- This library is free software; you can redistribute it and/or modify
- it under the terms of either:
+ SPDX-License-Identifier: LGPL-2.1-only OR MPL-2.0
- The LGPL as published by the Free Software Foundation, version
- 2.1, available at: https://www.gnu.org/licenses/lgpl-2.1.html
-
- Or:
-
- The Mozilla Public License Version 2.0. You may obtain a copy of
- the License at https://www.mozilla.org/MPL/
======================================================================*/
#ifdef HAVE_CONFIG_H
@@ -29,14 +21,14 @@
int *icallangbind_new_array(int size)
{
- int *p = (int *)malloc(size * sizeof(int));
+ int *p = (int *)icalmemory_new_buffer(size * sizeof(int));
return p; /* Caller handles failures */
}
void icallangbind_free_array(int *array)
{
- free(array);
+ icalmemory_free_buffer(array);
}
int icallangbind_access_array(int *array, int index)
@@ -195,7 +187,7 @@ char *icallangbind_property_eval_string_r(icalproperty *prop, const char *sep)
default:
{
char *str = icalvalue_as_ical_string_r(value);
- char *copy = (char *)malloc(strlen(str) + 1);
+ char *copy = (char *)icalmemory_new_buffer(strlen(str) + 1);
const char *i;
char *j;
@@ -221,8 +213,8 @@ char *icallangbind_property_eval_string_r(icalproperty *prop, const char *sep)
APPENDS(copy);
APPENDC('\'');
- free(copy);
- free(str);
+ icalmemory_free_buffer(copy);
+ icalmemory_free_buffer(str);
break;
}
}
@@ -244,7 +236,7 @@ char *icallangbind_property_eval_string_r(icalproperty *prop, const char *sep)
v = strchr(copy, '=');
if (v == 0) {
- free(copy);
+ icalmemory_free_buffer(copy);
continue;
}
@@ -260,7 +252,7 @@ char *icallangbind_property_eval_string_r(icalproperty *prop, const char *sep)
APPENDC('\'');
APPENDS(v);
APPENDC('\'');
- free(copy);
+ icalmemory_free_buffer(copy);
}
APPENDC('}');