Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Icecast-Server
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
94
Issues
94
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
External Wiki
External Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Xiph.Org
Icecast-Server
Commits
b4b8e3e5
Commit
b4b8e3e5
authored
Nov 08, 2007
by
Karl Heyes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bad pointer bug for libcurl and small memory leak over reload of xml
svn path=/icecast/trunk/icecast/; revision=14108
parent
0a347a68
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
src/yp.c
src/yp.c
+6
-5
No files found.
src/yp.c
View file @
b4b8e3e5
...
...
@@ -40,6 +40,7 @@
struct
yp_server
{
char
*
url
;
char
*
server_id
;
unsigned
url_timeout
;
unsigned
touch_interval
;
int
remove
;
...
...
@@ -184,6 +185,7 @@ static void destroy_yp_server (struct yp_server *server)
if
(
server
->
mounts
)
WARN0
(
"active ypdata not freed up"
);
if
(
server
->
pending_mounts
)
WARN0
(
"pending ypdata not freed up"
);
free
(
server
->
url
);
free
(
server
->
server_id
);
free
(
server
);
}
...
...
@@ -234,6 +236,7 @@ void yp_recheck_config (ice_config_t *config)
destroy_yp_server
(
server
);
break
;
}
server
->
server_id
=
strdup
((
char
*
)
server_version
);
server
->
url
=
strdup
(
config
->
yp_url
[
i
]);
server
->
url_timeout
=
config
->
yp_url_timeout
[
i
];
server
->
touch_interval
=
config
->
yp_touch_interval
[
i
];
...
...
@@ -245,7 +248,7 @@ void yp_recheck_config (ice_config_t *config)
}
if
(
server
->
touch_interval
<
30
)
server
->
touch_interval
=
30
;
curl_easy_setopt
(
server
->
curl
,
CURLOPT_USERAGENT
,
server
_version
);
curl_easy_setopt
(
server
->
curl
,
CURLOPT_USERAGENT
,
server
->
server_id
);
curl_easy_setopt
(
server
->
curl
,
CURLOPT_URL
,
server
->
url
);
curl_easy_setopt
(
server
->
curl
,
CURLOPT_HEADERFUNCTION
,
handle_returned_header
);
curl_easy_setopt
(
server
->
curl
,
CURLOPT_WRITEFUNCTION
,
handle_returned_data
);
...
...
@@ -427,13 +430,11 @@ static unsigned do_yp_touch (ypdata_t *yp, char *s, unsigned len)
free
(
val
);
}
val
=
stats_get_value
(
yp
->
mount
,
"max_listeners"
);
if
(
val
==
NULL
||
strcmp
(
val
,
"unlimited"
)
==
0
)
{
free
(
val
);
if
(
val
==
NULL
||
strcmp
(
val
,
"unlimited"
)
==
0
||
atoi
(
val
)
<
0
)
max_listeners
=
client_limit
;
}
else
max_listeners
=
atoi
(
val
);
free
(
val
);
val
=
stats_get_value
(
yp
->
mount
,
"subtype"
);
if
(
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