Fix two memory leaks. Found by Dietrich Teickner.
This commit is contained in:
parent
6cfbf89529
commit
81ce443f5e
|
@ -91,7 +91,7 @@ static INT CALLBACK SIC_CompareEntries( LPVOID p1, LPVOID p2, LPARAM lparam)
|
|||
* SIC_IconAppend [internal]
|
||||
*
|
||||
* NOTES
|
||||
* appends a icon pair to the end of the cache
|
||||
* appends an icon pair to the end of the cache
|
||||
*/
|
||||
static INT SIC_IconAppend (LPCSTR sSourceFile, INT dwSourceIndex, HICON hSmallIcon, HICON hBigIcon)
|
||||
{ LPSIC_ENTRY lpsice;
|
||||
|
@ -112,6 +112,7 @@ static INT SIC_IconAppend (LPCSTR sSourceFile, INT dwSourceIndex, HICON hSmallIc
|
|||
index = DPA_InsertPtr(sic_hdpa, 0x7fff, lpsice);
|
||||
if ( INVALID_INDEX == index )
|
||||
{
|
||||
HeapFree(GetProcessHeap(), 0, lpsice->sSourceFile);
|
||||
SHFree(lpsice);
|
||||
ret = INVALID_INDEX;
|
||||
}
|
||||
|
@ -269,6 +270,7 @@ BOOL SIC_Initialize(void)
|
|||
*/
|
||||
static INT CALLBACK sic_free( LPVOID ptr, LPVOID lparam )
|
||||
{
|
||||
HeapFree(GetProcessHeap(), 0, ((LPSIC_ENTRY)ptr)->sSourceFile);
|
||||
SHFree(ptr);
|
||||
return TRUE;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue