Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
aab3bb4e
Commit
aab3bb4e
authored
May 05, 2008
by
Rafaël Carré
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplify executable name retrieval and fix a memory leak
parent
f83f9df3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
10 deletions
+13
-10
src/libvlc-common.c
src/libvlc-common.c
+13
-10
No files found.
src/libvlc-common.c
View file @
aab3bb4e
...
...
@@ -250,18 +250,21 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
/* Get the executable name (similar to the basename command) */
if
(
i_argc
>
0
)
{
const
char
*
exe
=
ppsz_argv
[
0
];
const
char
*
tmp
=
exe
;
while
(
*
exe
)
const
char
*
psz_exe
=
ppsz_argv
[
0
]
+
strlen
(
ppsz_argv
[
0
]
);
for
(
;
psz_exe
>
ppsz_argv
[
0
]
;
psz_exe
--
)
{
if
(
*
exe
++
==
'/'
)
tmp
=
exe
;
if
(
*
psz_exe
==
'/'
)
{
psz_exe
++
;
break
;
}
p_libvlc
->
psz_object_name
=
strdup
(
tmp
);
}
else
if
(
*
psz_exe
)
{
p_libvlc
->
psz_object_name
=
strdup
(
"vlc"
);
free
(
p_libvlc
->
psz_object_name
);
p_libvlc
->
psz_object_name
=
strdup
(
psz_exe
);
}
}
/*
...
...
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