summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGravatar Stefan Richter 2010-06-05 15:21:00 +0200
committerGravatar Stefan Richter 2010-09-07 11:25:22 +0200
commit808cc7ee2cbca2ce560770d6bc35ee70b3a4ae22 (patch)
tree03b4309ebd15435f39f671d31050fa88746ec602 /src
parentTreat the kernel's iso context handle as opaque item (diff)
Always imply iso shutdown in fw_destroy_handle
because ieee1394_destroy_handle does it too. Otherwise, clients which rely on the ieee1394 backend behaviour leak memory when running on the juju backend. Also add the ability to call fw_iso_shutdown multiple times or before a successful context initialization. Faulty clients might rely on it based on ieee1394 backend behaviour. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Diffstat (limited to 'src')
-rw-r--r--src/fw-iso.c3
-rw-r--r--src/fw.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/src/fw-iso.c b/src/fw-iso.c
index 1829fd0..5193b9a 100644
--- a/src/fw-iso.c
+++ b/src/fw-iso.c
@@ -602,6 +602,9 @@ void fw_iso_stop(fw_handle_t handle)
void fw_iso_shutdown(fw_handle_t handle)
{
+ if (handle->iso.packets == NULL)
+ return;
+
munmap(handle->iso.buffer,
handle->iso.buf_packets * handle->iso.max_packet_size);
if (handle->iso.state != ISO_STOPPED)
diff --git a/src/fw.c b/src/fw.c
index f92c1b6..6c851e0 100644
--- a/src/fw.c
+++ b/src/fw.c
@@ -502,9 +502,8 @@ void fw_destroy_handle(fw_handle_t handle)
close(handle->devices[i].fd);
}
-
+ fw_iso_shutdown(handle);
close(handle->epoll_fd);
-
free(handle);
return;
97d88a9553d25bda873b1d&follow=1'>Added explicit AC_PROG_INSTALL call.Gravatar aeb 1-0/+1 2000-06-09Fix size of error field.Gravatar aeb 1-2/+2 2000-06-02Modified support for 32/64 bit environments, control struct fields have fixed...Gravatar aeb 7-43/+28 2000-05-28Added support for environments with 64 bit kernel and 32 bit userland.Gravatar aeb 8-7/+45 2000-04-27Fixed missing setting of ext code in raw1394_start_lock()Gravatar aeb 1-0/+1 2000-04-15Fixed lock transaction to actually return response value.Gravatar aeb 3-5/+11 2000-04-12Add userdata functions as news.Gravatar aeb 1-0/+4 2000-04-05Add userdata functions.Gravatar aeb 3-0/+18 2000-03-18Bump version number to 0.6.Gravatar aeb 3-5/+6 2000-03-18Mention byte order change.Gravatar aeb 1-0/+2 2000-03-18Mention SourceForge home.Gravatar aeb 1-1/+5