Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
2d9a2010
Commit
2d9a2010
authored
Apr 26, 2011
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt: fix memleak
And avoid a strdup(""); free() for nothing
parent
a05e7f35
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
7 deletions
+14
-7
modules/gui/qt4/dialogs_provider.cpp
modules/gui/qt4/dialogs_provider.cpp
+14
-7
No files found.
modules/gui/qt4/dialogs_provider.cpp
View file @
2d9a2010
...
@@ -681,16 +681,23 @@ void DialogsProvider::loadSubtitlesFile()
...
@@ -681,16 +681,23 @@ void DialogsProvider::loadSubtitlesFile()
input_item_t
*
p_item
=
input_GetItem
(
p_input
);
input_item_t
*
p_item
=
input_GetItem
(
p_input
);
if
(
!
p_item
)
return
;
if
(
!
p_item
)
return
;
char
*
path
=
make_path
(
input_item_GetURI
(
p_item
)
);
char
*
path
=
input_item_GetURI
(
p_item
);
if
(
!
path
)
path
=
strdup
(
""
);
char
*
path2
=
NULL
;
if
(
path
)
char
*
sep
=
strrchr
(
path
,
DIR_SEP_CHAR
);
{
if
(
sep
)
*
sep
=
'\0'
;
path2
=
make_path
(
path
);
free
(
path
);
if
(
path2
)
{
char
*
sep
=
strrchr
(
path2
,
DIR_SEP_CHAR
);
if
(
sep
)
*
sep
=
'\0'
;
}
}
QStringList
qsl
=
showSimpleOpen
(
qtr
(
"Open subtitles..."
),
QStringList
qsl
=
showSimpleOpen
(
qtr
(
"Open subtitles..."
),
EXT_FILTER_SUBTITLE
,
EXT_FILTER_SUBTITLE
,
qfu
(
path
)
);
qfu
(
path
2
)
);
free
(
path
);
free
(
path
2
);
foreach
(
const
QString
&
qsFile
,
qsl
)
foreach
(
const
QString
&
qsFile
,
qsl
)
{
{
if
(
input_AddSubtitle
(
p_input
,
qtu
(
toNativeSeparators
(
qsFile
)
),
if
(
input_AddSubtitle
(
p_input
,
qtu
(
toNativeSeparators
(
qsFile
)
),
...
...
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