diff options
author | Hans Petter Jansson <hpj@ximian.com> | 2003-03-18 09:48:41 +0800 |
---|---|---|
committer | Hans Petter <hansp@src.gnome.org> | 2003-03-18 09:48:41 +0800 |
commit | 93e6b5f8f49e61cd1153626afd3026efba19e1f1 (patch) | |
tree | 22dab7c3741e4521b46f47b827fd97a73ded47e2 /libical/src | |
parent | 76d5d480974306cceaa4770620936d19a9b6170d (diff) | |
download | gsoc2013-evolution-93e6b5f8f49e61cd1153626afd3026efba19e1f1.tar gsoc2013-evolution-93e6b5f8f49e61cd1153626afd3026efba19e1f1.tar.gz gsoc2013-evolution-93e6b5f8f49e61cd1153626afd3026efba19e1f1.tar.bz2 gsoc2013-evolution-93e6b5f8f49e61cd1153626afd3026efba19e1f1.tar.lz gsoc2013-evolution-93e6b5f8f49e61cd1153626afd3026efba19e1f1.tar.xz gsoc2013-evolution-93e6b5f8f49e61cd1153626afd3026efba19e1f1.tar.zst gsoc2013-evolution-93e6b5f8f49e61cd1153626afd3026efba19e1f1.zip |
Part of fix for #34095
2003-03-17 Hans Petter Jansson <hpj@ximian.com>
Part of fix for #34095
* scripts/mkderivedparameters.pl: Generate code to free old
string value when a new one is set.
* src/libical/icalperiod.c (icalperiodtype_as_ical_string):
Callers expect a temporary string, and thus won't free it, so
allocate returned memory from the temporary ring.
svn path=/trunk/; revision=20330
Diffstat (limited to 'libical/src')
-rw-r--r-- | libical/src/libical/icalperiod.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libical/src/libical/icalperiod.c b/libical/src/libical/icalperiod.c index 6117df526f..b8c8cad1a5 100644 --- a/libical/src/libical/icalperiod.c +++ b/libical/src/libical/icalperiod.c @@ -137,8 +137,9 @@ const char* icalperiodtype_as_ical_string(struct icalperiodtype p) icalmemory_append_string(&buf, &buf_ptr, &buf_size, end); - - return buf; + buf_ptr = icalmemory_tmp_copy (buf); + icalmemory_free_buffer (buf); + return buf_ptr; } |