Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-1.1
Commits
71713be8
Commit
71713be8
authored
Feb 05, 2007
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix memory leaks and dummy error messages in net_OpenDgram
parent
4116cd39
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
21 deletions
+19
-21
src/network/udp.c
src/network/udp.c
+19
-21
No files found.
src/network/udp.c
View file @
71713be8
...
@@ -699,38 +699,36 @@ int __net_OpenDgram( vlc_object_t *obj, const char *psz_bind, int i_bind,
...
@@ -699,38 +699,36 @@ int __net_OpenDgram( vlc_object_t *obj, const char *psz_bind, int i_bind,
continue
;
continue
;
}
}
struct
addrinfo
*
ptr2
;
val
=
-
1
;
for
(
ptr2
=
rem
;
ptr2
!=
NULL
;
ptr2
=
ptr2
->
ai_next
)
for
(
struct
addrinfo
*
ptr2
=
rem
;
ptr2
!=
NULL
;
ptr2
=
ptr2
->
ai_next
)
{
{
if
((
ptr2
->
ai_family
!=
ptr
->
ai_family
)
if
((
ptr2
->
ai_family
!=
ptr
->
ai_family
)
||
(
ptr2
->
ai_socktype
!=
ptr
->
ai_socktype
)
||
(
ptr2
->
ai_socktype
!=
ptr
->
ai_socktype
)
||
(
ptr2
->
ai_protocol
!=
ptr
->
ai_protocol
))
||
(
ptr2
->
ai_protocol
!=
ptr
->
ai_protocol
))
continue
;
continue
;
if
(
net_SockAddrIsMulticast
(
ptr
->
ai_addr
,
ptr
->
ai_addrlen
))
if
(
net_SockAddrIsMulticast
(
ptr
->
ai_addr
,
ptr
->
ai_addrlen
)
?
net_SourceSubscribe
(
obj
,
fd
,
ptr2
->
ai_addr
,
ptr2
->
ai_addrlen
,
ptr
->
ai_addr
,
ptr
->
ai_addrlen
)
:
connect
(
fd
,
ptr2
->
ai_addr
,
ptr2
->
ai_addrlen
))
{
{
if
(
net_SourceSubscribe
(
obj
,
fd
,
msg_Err
(
obj
,
"cannot connect to %s port %d: %s"
,
ptr2
->
ai_addr
,
ptr2
->
ai_addrlen
,
psz_server
,
i_server
,
net_strerror
(
net_errno
));
ptr
->
ai_addr
,
ptr
->
ai_addrlen
)
==
0
)
continue
;
break
;
}
else
{
if
(
connect
(
fd
,
ptr2
->
ai_addr
,
ptr2
->
ai_addrlen
)
==
0
)
break
;
}
}
val
=
fd
;
break
;
}
}
if
(
ptr2
==
NULL
)
if
(
val
!=
-
1
)
{
break
;
msg_Err
(
obj
,
"cannot connect to %s port %d: %s"
,
psz_server
,
i_server
,
net_strerror
(
net_errno
));
close
(
fd
);
continue
;
}
return
fd
;
close
(
fd
)
;
}
}
return
-
1
;
vlc_freeaddrinfo
(
rem
);
vlc_freeaddrinfo
(
loc
);
return
val
;
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment