Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
4d3f5285
Commit
4d3f5285
authored
Mar 15, 2009
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Leak rather than crash
parent
e85e04d0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
36 deletions
+1
-36
modules/misc/xml/libxml.c
modules/misc/xml/libxml.c
+1
-36
No files found.
modules/misc/xml/libxml.c
View file @
4d3f5285
...
@@ -67,33 +67,6 @@ static void CatalogLoad( xml_t *, const char * );
...
@@ -67,33 +67,6 @@ static void CatalogLoad( xml_t *, const char * );
static
void
CatalogAdd
(
xml_t
*
,
const
char
*
,
const
char
*
,
const
char
*
);
static
void
CatalogAdd
(
xml_t
*
,
const
char
*
,
const
char
*
,
const
char
*
);
static
int
StreamRead
(
void
*
p_context
,
char
*
p_buffer
,
int
i_buffer
);
static
int
StreamRead
(
void
*
p_context
,
char
*
p_buffer
,
int
i_buffer
);
static
unsigned
refs
=
0
;
#if defined (LIBVLC_USE_PTHREAD)
static
vlc_mutex_t
lock
=
PTHREAD_MUTEX_INITIALIZER
;
#elif defined (WIN32)
static
vlc_mutex_t
lock
;
BOOL
WINAPI
DllMain
(
HINSTANCE
hinstDll
,
DWORD
fdwReason
,
LPVOID
lpvReserved
)
{
(
void
)
hinstDll
;
(
void
)
lpvReserved
;
switch
(
fdwReason
)
{
case
DLL_PROCESS_ATTACH
:
vlc_mutex_init
(
&
lock
);
break
;
case
DLL_PROCESS_DETACH
:
vlc_mutex_destroy
(
&
lock
);
break
;
}
return
TRUE
;
}
#else
# error FIXME
#endif
/*****************************************************************************
/*****************************************************************************
* Module initialization
* Module initialization
*****************************************************************************/
*****************************************************************************/
...
@@ -104,10 +77,7 @@ static int Open( vlc_object_t *p_this )
...
@@ -104,10 +77,7 @@ static int Open( vlc_object_t *p_this )
if
(
!
xmlHasFeature
(
XML_WITH_THREAD
)
)
if
(
!
xmlHasFeature
(
XML_WITH_THREAD
)
)
return
VLC_EGENERIC
;
return
VLC_EGENERIC
;
vlc_mutex_lock
(
&
lock
);
xmlInitParser
();
if
(
refs
++
==
0
)
xmlInitParser
();
vlc_mutex_unlock
(
&
lock
);
p_xml
->
pf_reader_create
=
ReaderCreate
;
p_xml
->
pf_reader_create
=
ReaderCreate
;
p_xml
->
pf_reader_delete
=
ReaderDelete
;
p_xml
->
pf_reader_delete
=
ReaderDelete
;
...
@@ -123,11 +93,6 @@ static int Open( vlc_object_t *p_this )
...
@@ -123,11 +93,6 @@ static int Open( vlc_object_t *p_this )
*****************************************************************************/
*****************************************************************************/
static
void
Close
(
vlc_object_t
*
p_this
)
static
void
Close
(
vlc_object_t
*
p_this
)
{
{
vlc_mutex_lock
(
&
lock
);
if
(
--
refs
==
0
)
xmlCleanupParser
();
vlc_mutex_unlock
(
&
lock
);
VLC_UNUSED
(
p_this
);
VLC_UNUSED
(
p_this
);
return
;
return
;
}
}
...
...
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