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
1799ceb8
Commit
1799ceb8
authored
Aug 15, 2008
by
Juan Lang
Committed by
Alexandre Julliard
Aug 19, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypt32: Free memory using the correct function on failure.
parent
9423f836
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
3 deletions
+11
-3
encode.c
dlls/crypt32/encode.c
+11
-3
No files found.
dlls/crypt32/encode.c
View file @
1799ceb8
...
...
@@ -1561,6 +1561,14 @@ static BOOL CRYPT_AsnEncodeUnicodeStringCoerce(const CERT_NAME_VALUE *value,
return
ret
;
}
static
void
CRYPT_FreeSpace
(
PCRYPT_ENCODE_PARA
pEncodePara
,
LPVOID
pv
)
{
if
(
pEncodePara
&&
pEncodePara
->
pfnFree
)
pEncodePara
->
pfnFree
(
pv
);
else
LocalFree
(
pv
);
}
static
BOOL
CRYPT_AsnEncodeNumericString
(
const
CERT_NAME_VALUE
*
value
,
DWORD
dwFlags
,
PCRYPT_ENCODE_PARA
pEncodePara
,
BYTE
*
pbEncoded
,
DWORD
*
pcbEncoded
)
...
...
@@ -1602,7 +1610,7 @@ static BOOL CRYPT_AsnEncodeNumericString(const CERT_NAME_VALUE *value,
}
}
if
(
!
ret
&&
(
dwFlags
&
CRYPT_ENCODE_ALLOC_FLAG
))
C
ryptMemFree
(
*
(
BYTE
**
)
pbEncoded
);
C
RYPT_FreeSpace
(
pEncodePara
,
*
(
BYTE
**
)
pbEncoded
);
}
}
return
ret
;
...
...
@@ -1656,7 +1664,7 @@ static BOOL CRYPT_AsnEncodePrintableString(const CERT_NAME_VALUE *value,
}
}
if
(
!
ret
&&
(
dwFlags
&
CRYPT_ENCODE_ALLOC_FLAG
))
C
ryptMemFree
(
*
(
BYTE
**
)
pbEncoded
);
C
RYPT_FreeSpace
(
pEncodePara
,
*
(
BYTE
**
)
pbEncoded
);
}
}
return
ret
;
...
...
@@ -1703,7 +1711,7 @@ static BOOL CRYPT_AsnEncodeIA5String(const CERT_NAME_VALUE *value,
}
}
if
(
!
ret
&&
(
dwFlags
&
CRYPT_ENCODE_ALLOC_FLAG
))
C
ryptMemFree
(
*
(
BYTE
**
)
pbEncoded
);
C
RYPT_FreeSpace
(
pEncodePara
,
*
(
BYTE
**
)
pbEncoded
);
}
}
return
ret
;
...
...
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