summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorGravatar Philippe Troin 2008-06-16 11:12:00 -0400
committerGravatar Dan Dennedy 2008-07-05 13:09:29 -0700
commit477b6eee6d7d2881945eb5acfc23d3930bb506b1 (patch)
tree77043881f39e91224dfcdf085cc33123655e01a3 /tools
parentMove the source code files in the juju directory into the src directory and (diff)
Plug dir leak and initialize data structs
While trying to track down some crashes in kino, I found the following problems with libraw1394: * There is a DIR* leak in raw1394_set_port(). * Lots of data structures are not fully initialized when calling IEEE1394 ioctl()s. These cause valgrind errors (benign, as valgrind does not know how to interpret all ioctls. However these also cause kino to crash in libraw1394. I've added a bunch of memset()s to prevent this problem from happening. Forward-ported to libraw1394 git tree by Jarod Wilson.
Diffstat (limited to 'tools')
-rw-r--r--tools/testlibraw.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/testlibraw.c b/tools/testlibraw.c
index 2f02a6d..efd87ad 100644
--- a/tools/testlibraw.c
+++ b/tools/testlibraw.c
@@ -202,6 +202,7 @@ int main(int argc, char **argv)
read_topology_map(handle);
printf("testing config rom stuff\n");
+ memset(rom, 0, sizeof(rom));
retval=raw1394_get_config_rom(handle, rom, 0x100, &rom_size, &rom_version);
printf("get_config_rom returned %d, romsize %d, rom_version %d\n",retval,rom_size,rom_version);
printf("here are the first 10 quadlets:\n");