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
8dc8e064
Commit
8dc8e064
authored
Jan 15, 2013
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DirectDraw: fix memleaks introduced by
46b26be5
parent
8de5a80d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
5 deletions
+9
-5
modules/video_output/msw/directx.c
modules/video_output/msw/directx.c
+9
-5
No files found.
modules/video_output/msw/directx.c
View file @
8dc8e064
...
@@ -454,8 +454,9 @@ static BOOL WINAPI DirectXOpenDDrawCallback(GUID *guid, LPTSTR desc,
...
@@ -454,8 +454,9 @@ static BOOL WINAPI DirectXOpenDDrawCallback(GUID *guid, LPTSTR desc,
return
TRUE
;
return
TRUE
;
char
*
psz_drivername
=
FromT
(
drivername
);
char
*
psz_drivername
=
FromT
(
drivername
);
char
*
psz_desc
=
FromT
(
desc
);
msg_Dbg
(
vd
,
"DirectXEnumCallback: %s, %s"
,
FromT
(
desc
)
,
psz_drivername
);
msg_Dbg
(
vd
,
"DirectXEnumCallback: %s, %s"
,
psz_desc
,
psz_drivername
);
char
*
device
=
var_GetString
(
vd
,
"directx-device"
);
char
*
device
=
var_GetString
(
vd
,
"directx-device"
);
...
@@ -484,7 +485,7 @@ static BOOL WINAPI DirectXOpenDDrawCallback(GUID *guid, LPTSTR desc,
...
@@ -484,7 +485,7 @@ static BOOL WINAPI DirectXOpenDDrawCallback(GUID *guid, LPTSTR desc,
free
(
device
);
free
(
device
);
if
(
hmon
==
sys
->
hmonitor
)
{
if
(
hmon
==
sys
->
hmonitor
)
{
msg_Dbg
(
vd
,
"selecting %s, %s"
,
FromT
(
desc
)
,
psz_drivername
);
msg_Dbg
(
vd
,
"selecting %s, %s"
,
psz_desc
,
psz_drivername
);
free
(
sys
->
display_driver
);
free
(
sys
->
display_driver
);
sys
->
display_driver
=
malloc
(
sizeof
(
*
guid
));
sys
->
display_driver
=
malloc
(
sizeof
(
*
guid
));
...
@@ -492,6 +493,8 @@ static BOOL WINAPI DirectXOpenDDrawCallback(GUID *guid, LPTSTR desc,
...
@@ -492,6 +493,8 @@ static BOOL WINAPI DirectXOpenDDrawCallback(GUID *guid, LPTSTR desc,
*
sys
->
display_driver
=
*
guid
;
*
sys
->
display_driver
=
*
guid
;
}
}
free
(
psz_drivername
);
free
(
psz_desc
);
return
TRUE
;
return
TRUE
;
}
}
/**
/**
...
@@ -1430,14 +1433,15 @@ static BOOL WINAPI DirectXEnumCallback2(GUID *guid, LPTSTR desc,
...
@@ -1430,14 +1433,15 @@ static BOOL WINAPI DirectXEnumCallback2(GUID *guid, LPTSTR desc,
VLC_UNUSED
(
guid
);
VLC_UNUSED
(
desc
);
VLC_UNUSED
(
hmon
);
VLC_UNUSED
(
guid
);
VLC_UNUSED
(
desc
);
VLC_UNUSED
(
hmon
);
char
*
psz_drivername
=
FromT
(
drivername
);
ctx
->
values
=
xrealloc
(
ctx
->
values
,
(
ctx
->
count
+
1
)
*
sizeof
(
char
*
));
ctx
->
values
=
xrealloc
(
ctx
->
values
,
(
ctx
->
count
+
1
)
*
sizeof
(
char
*
));
ctx
->
descs
=
xrealloc
(
ctx
->
descs
,
(
ctx
->
count
+
1
)
*
sizeof
(
char
*
));
ctx
->
descs
=
xrealloc
(
ctx
->
descs
,
(
ctx
->
count
+
1
)
*
sizeof
(
char
*
));
/* TODO? Unicode APIs */
ctx
->
values
[
ctx
->
count
]
=
psz_drivername
;
ctx
->
values
[
ctx
->
count
]
=
FromT
(
drivername
);
ctx
->
descs
[
ctx
->
count
]
=
psz_drivername
;
ctx
->
descs
[
ctx
->
count
]
=
FromT
(
drivername
);
ctx
->
count
++
;
ctx
->
count
++
;
free
(
psz_drivername
);
return
TRUE
;
/* Keep enumerating */
return
TRUE
;
/* Keep enumerating */
}
}
...
...
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