Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
8701f92e
Commit
8701f92e
authored
Oct 20, 2015
by
Bruno Jesus
Committed by
Alexandre Julliard
Oct 21, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvfw32: Use a helper to free memory.
Signed-off-by:
Bruno Jesus
<
00cpxxx@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
40922ccd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
10 deletions
+11
-10
msvideo_main.c
dlls/msvfw32/msvideo_main.c
+11
-10
No files found.
dlls/msvfw32/msvideo_main.c
View file @
8701f92e
...
...
@@ -1401,6 +1401,15 @@ LPVOID VFWAPI ICSeqCompressFrame(PCOMPVARS pc, UINT uiFlags, LPVOID lpBits, BOOL
return
NULL
;
}
static
void
clear_compvars
(
PCOMPVARS
pc
)
{
HeapFree
(
GetProcessHeap
(),
0
,
pc
->
lpbiIn
);
HeapFree
(
GetProcessHeap
(),
0
,
pc
->
lpBitsPrev
);
HeapFree
(
GetProcessHeap
(),
0
,
pc
->
lpBitsOut
);
HeapFree
(
GetProcessHeap
(),
0
,
pc
->
lpState
);
pc
->
lpbiIn
=
pc
->
lpBitsPrev
=
pc
->
lpBitsOut
=
pc
->
lpState
=
NULL
;
}
/***********************************************************************
* ICSeqCompressFrameEnd [MSVFW32.@]
*/
...
...
@@ -1410,11 +1419,7 @@ void VFWAPI ICSeqCompressFrameEnd(PCOMPVARS pc)
TRACE
(
"(%p)
\n
"
,
pc
);
ret
=
ICSendMessage
(
pc
->
hic
,
ICM_COMPRESS_END
,
0
,
0
);
TRACE
(
" -- %x
\n
"
,
ret
);
HeapFree
(
GetProcessHeap
(),
0
,
pc
->
lpbiIn
);
HeapFree
(
GetProcessHeap
(),
0
,
pc
->
lpBitsPrev
);
HeapFree
(
GetProcessHeap
(),
0
,
pc
->
lpBitsOut
);
HeapFree
(
GetProcessHeap
(),
0
,
pc
->
lpState
);
pc
->
lpbiIn
=
pc
->
lpBitsPrev
=
pc
->
lpBitsOut
=
pc
->
lpState
=
NULL
;
clear_compvars
(
pc
);
}
/***********************************************************************
...
...
@@ -1474,11 +1479,7 @@ BOOL VFWAPI ICSeqCompressFrameStart(PCOMPVARS pc, LPBITMAPINFO lpbiIn)
return
TRUE
;
}
error:
HeapFree
(
GetProcessHeap
(),
0
,
pc
->
lpbiIn
);
HeapFree
(
GetProcessHeap
(),
0
,
pc
->
lpBitsPrev
);
HeapFree
(
GetProcessHeap
(),
0
,
pc
->
lpState
);
HeapFree
(
GetProcessHeap
(),
0
,
pc
->
lpBitsOut
);
pc
->
lpBitsPrev
=
pc
->
lpbiIn
=
pc
->
lpState
=
pc
->
lpBitsOut
=
NULL
;
clear_compvars
(
pc
);
return
FALSE
;
}
...
...
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