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
This commit is contained in:
dmaas 2003-04-07 22:23:20 +00:00
parent 081780c175
commit 2ed48152b0
1 changed files with 3 additions and 1 deletions

View File

@ -411,8 +411,10 @@ raw1394handle_t raw1394_new_handle_on_port(int port)
return NULL; return NULL;
tryagain: 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; return NULL;
}
if (raw1394_set_port(handle, port)) { if (raw1394_set_port(handle, port)) {
if (errno == ESTALE || errno == EINTR) { if (errno == ESTALE || errno == EINTR) {