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
1692e700
Commit
1692e700
authored
May 28, 2009
by
Derk-Jan Hartman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
macosx controls: Another string memleak.
parent
a037a08d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
9 deletions
+12
-9
modules/gui/macosx/controls.m
modules/gui/macosx/controls.m
+12
-9
No files found.
modules/gui/macosx/controls.m
View file @
1692e700
...
@@ -707,7 +707,6 @@
...
@@ -707,7 +707,6 @@
[
o_mi
setTitle
:
[[
VLCMain
sharedInstance
]
localizedString
:
text
.
psz_string
?
[
o_mi
setTitle
:
[[
VLCMain
sharedInstance
]
localizedString
:
text
.
psz_string
?
text
.
psz_string
:
psz_variable
]];
text
.
psz_string
:
psz_variable
]];
var_Get
(
p_object
,
psz_variable
,
&
val
);
if
(
i_type
&
VLC_VAR_HASCHOICE
)
if
(
i_type
&
VLC_VAR_HASCHOICE
)
{
{
NSMenu
*
o_menu
=
[
o_mi
submenu
];
NSMenu
*
o_menu
=
[
o_mi
submenu
];
...
@@ -718,6 +717,10 @@
...
@@ -718,6 +717,10 @@
free
(
text
.
psz_string
);
free
(
text
.
psz_string
);
return
;
return
;
}
}
if
(
var_Get
(
p_object
,
psz_variable
,
&
val
)
<
0
)
{
return
;
}
VLCAutoGeneratedMenuContent
*
o_data
;
VLCAutoGeneratedMenuContent
*
o_data
;
switch
(
i_type
&
VLC_VAR_TYPE
)
switch
(
i_type
&
VLC_VAR_TYPE
)
...
@@ -737,8 +740,7 @@
...
@@ -737,8 +740,7 @@
break
;
break
;
default:
default:
free
(
text
.
psz_string
);
break
;
return
;
}
}
if
(
(
i_type
&
VLC_VAR_TYPE
)
==
VLC_VAR_STRING
)
free
(
val
.
psz_string
);
if
(
(
i_type
&
VLC_VAR_TYPE
)
==
VLC_VAR_STRING
)
free
(
val
.
psz_string
);
...
@@ -831,7 +833,6 @@
...
@@ -831,7 +833,6 @@
for
(
i
=
0
;
i
<
val_list
.
p_list
->
i_count
;
i
++
)
for
(
i
=
0
;
i
<
val_list
.
p_list
->
i_count
;
i
++
)
{
{
vlc_value_t
another_val
;
NSMenuItem
*
o_lmi
;
NSMenuItem
*
o_lmi
;
NSString
*
o_title
=
@""
;
NSString
*
o_title
=
@""
;
VLCAutoGeneratedMenuContent
*
o_data
;
VLCAutoGeneratedMenuContent
*
o_data
;
...
@@ -839,15 +840,13 @@
...
@@ -839,15 +840,13 @@
switch
(
i_type
&
VLC_VAR_TYPE
)
switch
(
i_type
&
VLC_VAR_TYPE
)
{
{
case
VLC_VAR_STRING
:
case
VLC_VAR_STRING
:
another_val
.
psz_string
=
strdup
(
val_list
.
p_list
->
p_values
[
i
].
psz_string
);
o_title
=
[[
VLCMain
sharedInstance
]
localizedString
:
text_list
.
p_list
->
p_values
[
i
].
psz_string
?
o_title
=
[[
VLCMain
sharedInstance
]
localizedString
:
text_list
.
p_list
->
p_values
[
i
].
psz_string
?
text_list
.
p_list
->
p_values
[
i
].
psz_string
:
val_list
.
p_list
->
p_values
[
i
].
psz_string
];
text_list
.
p_list
->
p_values
[
i
].
psz_string
:
val_list
.
p_list
->
p_values
[
i
].
psz_string
];
o_lmi
=
[
o_menu
addItemWithTitle
:
o_title
action
:
pf_callback
keyEquivalent
:
@""
];
o_lmi
=
[
o_menu
addItemWithTitle
:
o_title
action
:
pf_callback
keyEquivalent
:
@""
];
o_data
=
[[
VLCAutoGeneratedMenuContent
alloc
]
initWithVariableName
:
psz_variable
ofObject
:
p_object
o_data
=
[[
VLCAutoGeneratedMenuContent
alloc
]
initWithVariableName
:
psz_variable
ofObject
:
p_object
andValue:
another_val
ofType
:
i_type
];
andValue:
val_list
.
p_list
->
p_values
[
i
]
ofType
:
i_type
];
[
o_lmi
setRepresentedObject
:
[
o_data
autorelease
]];
[
o_lmi
setRepresentedObject
:
[
o_data
autorelease
]];
[
o_lmi
setTarget
:
self
];
[
o_lmi
setTarget
:
self
];
...
@@ -1156,10 +1155,12 @@
...
@@ -1156,10 +1155,12 @@
if
(
self
!=
nil
)
if
(
self
!=
nil
)
{
{
psz_name
=
strdup
(
name
);
_vlc_object
=
vlc_object_hold
(
object
);
_vlc_object
=
vlc_object_hold
(
object
);
value
=
val
;
psz_name
=
strdup
(
name
)
;
i_type
=
type
;
i_type
=
type
;
value
=
val
;
if
(
(
i_type
&
VLC_VAR_TYPE
)
==
VLC_VAR_STRING
)
value
.
psz_string
=
strdup
(
val
.
psz_string
);
}
}
return
(
self
);
return
(
self
);
...
@@ -1168,6 +1169,8 @@
...
@@ -1168,6 +1169,8 @@
-
(
void
)
dealloc
-
(
void
)
dealloc
{
{
vlc_object_release
(
_vlc_object
);
vlc_object_release
(
_vlc_object
);
if
(
(
i_type
&
VLC_VAR_TYPE
)
==
VLC_VAR_STRING
)
free
(
value
.
psz_string
);
free
(
psz_name
);
free
(
psz_name
);
[
super
dealloc
];
[
super
dealloc
];
}
}
...
...
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