summaryrefslogtreecommitdiffstats
path: root/src/main.c
diff options
context:
space:
mode:
authorGravatar dmaas 2003-04-07 22:23:20 +0000
committerGravatar dmaas 2003-04-07 22:23:20 +0000
commit2ed48152b02a273b899d6a8fb562d949aa5121b8 (patch)
tree0a57fefbecffe5b71b42ccf884aecf1d85bfea08 /src/main.c
parentadd raw1394_new_handle_on_port() convenience function (diff)
new_handle_on_port() error path fix from Jim Radford
git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@105 53a565d1-3bb7-0310-b661-cf11e63c67ab
Diffstat (limited to '')
-rw-r--r--src/main.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index 018943d..3d611bc 100644
--- a/src/main.c
+++ b/src/main.c
@@ -411,8 +411,10 @@ raw1394handle_t raw1394_new_handle_on_port(int port)
return NULL;
tryagain:
- if (raw1394_get_port_info(handle, NULL, 0) < 0)
+ if (raw1394_get_port_info(handle, NULL, 0) < 0) {
+ raw1394_destroy_handle(handle);
return NULL;
+ }
if (raw1394_set_port(handle, port)) {
if (errno == ESTALE || errno == EINTR) {