diff options
author | Milan Crha <mcrha@redhat.com> | 2019-10-14 21:23:20 +0200 |
---|---|---|
committer | Corentin Noël <corentin@elementary.io> | 2019-10-15 18:45:40 +0200 |
commit | 57e4b56fac028f83b7a467001ea982b47ab44580 (patch) | |
tree | 02092298900dbc9a0d44c6a2f1476191df5ba1ca /src/test/libical-glib/attach.py | |
parent | f3239364efcd91ba29c79e4122820805660138b3 (diff) | |
download | libical-git-mcrha/annotations.tar.gz |
Let icalattach_new_from_data() use the 'free_fn' argument againmcrha/annotations
This had been disabled with commit 7a2f318bacae5521848963d96a3a644bc6be1d01
(in time of 1.0.1) to fix inline attachments crashing. That commit could
eventually cause memory leaks and higher memory usage.
This change adds necessary strdup() calls on places where required only and
makes use of the 'free_fn' argument again. It also fixes libical-glib's
i_cal_attach_new_from_bytes(), which relies on this 'free_fn'.
Diffstat (limited to 'src/test/libical-glib/attach.py')
-rwxr-xr-x | src/test/libical-glib/attach.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/libical-glib/attach.py b/src/test/libical-glib/attach.py index 933274b3..31a04939 100755 --- a/src/test/libical-glib/attach.py +++ b/src/test/libical-glib/attach.py @@ -33,7 +33,7 @@ assert(attach_url.get_is_url() == 1); retrieved_url = attach_url.get_url(); assert(retrieved_url == dummy_url); -attach_data = ICalGLib.Attach.new_from_data(dummy_data, ICalGLib.memory_free_buffer, None); +attach_data = ICalGLib.Attach.new_from_data(dummy_data, None, None); assert(attach_data.get_is_url() == 0); retrieved_data = attach_data.get_data(); assert(retrieved_data == dummy_data); |