summaryrefslogtreecommitdiffstats
path: root/juju
diff options
context:
space:
mode:
authorGravatar Jarod Wilson 2007-10-24 16:50:24 -0400
committerGravatar Kristian Høgsberg 2007-10-24 16:50:24 -0400
commit8085c633bce9fed1a74dd2037d7f3a95f839a4e2 (patch)
treeb6aadd9b3340ee8eaab94fa56c3998da4457c580 /juju
parentUpdate the juju implementation to follow the recent bitfield changes. (diff)
Set handle->iso.packets to NULL after freeing to avoid double-frees.
Diffstat (limited to 'juju')
-rw-r--r--juju/raw1394-iso.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/juju/raw1394-iso.c b/juju/raw1394-iso.c
index b1e493c..ae8aaad 100644
--- a/juju/raw1394-iso.c
+++ b/juju/raw1394-iso.c
@@ -389,6 +389,7 @@ iso_init(raw1394handle_t handle, int type,
handle->iso.fd = open(handle->local_filename, O_RDWR);
if (handle->iso.fd < 0) {
free(handle->iso.packets);
+ handle->iso.packets = NULL;
return -1;
}
@@ -399,6 +400,7 @@ iso_init(raw1394handle_t handle, int type,
handle->iso.fd, &ep) < 0) {
close(handle->iso.fd);
free(handle->iso.packets);
+ handle->iso.packets = NULL;
return -1;
}
@@ -412,6 +414,7 @@ iso_init(raw1394handle_t handle, int type,
if (retval < 0) {
close(handle->iso.fd);
free(handle->iso.packets);
+ handle->iso.packets = NULL;
return retval;
}
@@ -422,6 +425,7 @@ iso_init(raw1394handle_t handle, int type,
if (handle->iso.buffer == MAP_FAILED) {
close(handle->iso.fd);
free(handle->iso.packets);
+ handle->iso.packets = NULL;
return -1;
}
@@ -514,4 +518,5 @@ void raw1394_iso_shutdown(raw1394handle_t handle)
handle->iso.buf_packets * handle->iso.max_packet_size);
close(handle->iso.fd);
free(handle->iso.packets);
+ handle->iso.packets = NULL;
}
i-225-egg/tag/?h=draft-1'>draft-1Gravatar Arthur A. Gleckler 3-0/+114 2021-07-18Ignore trailing whitespace.Gravatar Arthur A. Gleckler 11-129/+129 2021-07-18Ignore "Dictionaries.log".Gravatar Arthur A. Gleckler 1-1/+2 2021-07-18Fix errors reported by W3C HTML Validator.Gravatar Arthur A. Gleckler 1-27/+27 2021-07-18Eliminate unnecessary redirect by using TLS/SSL.Gravatar Arthur A. Gleckler 1-1/+1