Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
193b9b89
Commit
193b9b89
authored
Feb 10, 2009
by
Andrew Talbot
Committed by
Alexandre Julliard
Feb 11, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
itss: Replace malloc() with HeapAlloc().
parent
c83039bd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
7 deletions
+9
-7
lzx.c
dlls/itss/lzx.c
+9
-7
No files found.
dlls/itss/lzx.c
View file @
193b9b89
...
@@ -36,15 +36,17 @@
...
@@ -36,15 +36,17 @@
***************************************************************************/
***************************************************************************/
#include "lzx.h"
#include "lzx.h"
#include <stdarg.h>
#include <stdio.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdlib.h>
#include <string.h>
#include <string.h>
#include "windef.h"
#include "winbase.h"
/* sized types */
/* sized types */
typedef
unsigned
char
UBYTE
;
/* 8 bits exactly */
typedef
unsigned
char
UBYTE
;
/* 8 bits exactly */
typedef
unsigned
short
UWORD
;
/* 16 bits (or more) */
typedef
unsigned
short
UWORD
;
/* 16 bits (or more) */
typedef
unsigned
int
ULONG
;
/* 32 bits (or more) */
typedef
signed
int
LONG
;
/* 32 bits (or more) */
/* some constants defined by the LZX specification */
/* some constants defined by the LZX specification */
#define LZX_MIN_MATCH (2)
#define LZX_MIN_MATCH (2)
...
@@ -178,10 +180,10 @@ struct LZXstate *LZXinit(int window)
...
@@ -178,10 +180,10 @@ struct LZXstate *LZXinit(int window)
if
(
window
<
15
||
window
>
21
)
return
NULL
;
if
(
window
<
15
||
window
>
21
)
return
NULL
;
/* allocate state and associated window */
/* allocate state and associated window */
pState
=
malloc
(
sizeof
(
struct
LZXstate
));
pState
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
struct
LZXstate
));
if
(
!
(
pState
->
window
=
malloc
(
wndsize
)))
if
(
!
(
pState
->
window
=
HeapAlloc
(
GetProcessHeap
(),
0
,
wndsize
)))
{
{
free
(
pState
);
HeapFree
(
GetProcessHeap
(),
0
,
pState
);
return
NULL
;
return
NULL
;
}
}
pState
->
actual_size
=
wndsize
;
pState
->
actual_size
=
wndsize
;
...
@@ -217,8 +219,8 @@ void LZXteardown(struct LZXstate *pState)
...
@@ -217,8 +219,8 @@ void LZXteardown(struct LZXstate *pState)
{
{
if
(
pState
)
if
(
pState
)
{
{
free
(
pState
->
window
);
HeapFree
(
GetProcessHeap
(),
0
,
pState
->
window
);
free
(
pState
);
HeapFree
(
GetProcessHeap
(),
0
,
pState
);
}
}
}
}
...
...
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