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
7cb43c9d
Commit
7cb43c9d
authored
Dec 21, 2004
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Dec 21, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not check for non NULL pointer before HeepFree'ing it. It's
redundant.
parent
8c6a442b
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
34 additions
and
45 deletions
+34
-45
cookie.c
dlls/wininet/cookie.c
+6
-12
ftp.c
dlls/wininet/ftp.c
+12
-12
http.c
dlls/wininet/http.c
+6
-7
internet.c
dlls/wininet/internet.c
+10
-14
No files found.
dlls/wininet/cookie.c
View file @
7cb43c9d
...
...
@@ -372,12 +372,9 @@ BOOL WINAPI InternetGetCookieA(LPCSTR lpszUrl, LPCSTR lpszCookieName,
lpCookieData
,
*
lpdwSize
,
NULL
,
NULL
);
}
if
(
szCookieData
)
HeapFree
(
GetProcessHeap
(),
0
,
szCookieData
);
if
(
szCookieName
)
HeapFree
(
GetProcessHeap
(),
0
,
szCookieName
);
if
(
szUrl
)
HeapFree
(
GetProcessHeap
(),
0
,
szUrl
);
HeapFree
(
GetProcessHeap
(),
0
,
szCookieData
);
HeapFree
(
GetProcessHeap
(),
0
,
szCookieName
);
HeapFree
(
GetProcessHeap
(),
0
,
szUrl
);
return
r
;
}
...
...
@@ -499,12 +496,9 @@ BOOL WINAPI InternetSetCookieA(LPCSTR lpszUrl, LPCSTR lpszCookieName,
r
=
InternetSetCookieW
(
szUrl
,
szCookieName
,
szCookieData
);
if
(
szCookieData
)
HeapFree
(
GetProcessHeap
(),
0
,
szCookieData
);
if
(
szCookieName
)
HeapFree
(
GetProcessHeap
(),
0
,
szCookieName
);
if
(
szUrl
)
HeapFree
(
GetProcessHeap
(),
0
,
szUrl
);
HeapFree
(
GetProcessHeap
(),
0
,
szCookieData
);
HeapFree
(
GetProcessHeap
(),
0
,
szCookieName
);
HeapFree
(
GetProcessHeap
(),
0
,
szUrl
);
return
r
;
}
dlls/wininet/ftp.c
View file @
7cb43c9d
...
...
@@ -165,8 +165,8 @@ BOOL WINAPI FtpPutFileA(HINTERNET hConnect, LPCSTR lpszLocalFile,
lpwzNewRemoteFile
=
lpszNewRemoteFile
?
WININET_strdup_AtoW
(
lpszNewRemoteFile
)
:
NULL
;
ret
=
FtpPutFileW
(
hConnect
,
lpwzLocalFile
,
lpwzNewRemoteFile
,
dwFlags
,
dwContext
);
if
(
lpwzLocalFile
)
HeapFree
(
GetProcessHeap
(),
0
,
lpwzLocalFile
);
if
(
lpwzNewRemoteFile
)
HeapFree
(
GetProcessHeap
(),
0
,
lpwzNewRemoteFile
);
HeapFree
(
GetProcessHeap
(),
0
,
lpwzLocalFile
);
HeapFree
(
GetProcessHeap
(),
0
,
lpwzNewRemoteFile
);
return
ret
;
}
...
...
@@ -322,7 +322,7 @@ BOOL WINAPI FtpSetCurrentDirectoryA(HINTERNET hConnect, LPCSTR lpszDirectory)
lpwzDirectory
=
lpszDirectory
?
WININET_strdup_AtoW
(
lpszDirectory
)
:
NULL
;
ret
=
FtpSetCurrentDirectoryW
(
hConnect
,
lpwzDirectory
);
if
(
lpwzDirectory
)
HeapFree
(
GetProcessHeap
(),
0
,
lpwzDirectory
);
HeapFree
(
GetProcessHeap
(),
0
,
lpwzDirectory
);
return
ret
;
}
...
...
@@ -451,7 +451,7 @@ BOOL WINAPI FtpCreateDirectoryA(HINTERNET hConnect, LPCSTR lpszDirectory)
lpwzDirectory
=
lpszDirectory
?
WININET_strdup_AtoW
(
lpszDirectory
)
:
NULL
;
ret
=
FtpCreateDirectoryW
(
hConnect
,
lpwzDirectory
);
if
(
lpwzDirectory
)
HeapFree
(
GetProcessHeap
(),
0
,
lpwzDirectory
);
HeapFree
(
GetProcessHeap
(),
0
,
lpwzDirectory
);
return
ret
;
}
...
...
@@ -579,7 +579,7 @@ HINTERNET WINAPI FtpFindFirstFileA(HINTERNET hConnect,
lpwzSearchFile
=
lpszSearchFile
?
WININET_strdup_AtoW
(
lpszSearchFile
)
:
NULL
;
lpFindFileDataW
=
lpFindFileData
?&
wfd
:
NULL
;
ret
=
FtpFindFirstFileW
(
hConnect
,
lpwzSearchFile
,
lpFindFileDataW
,
dwFlags
,
dwContext
);
if
(
lpwzSearchFile
)
HeapFree
(
GetProcessHeap
(),
0
,
lpwzSearchFile
);
HeapFree
(
GetProcessHeap
(),
0
,
lpwzSearchFile
);
if
(
lpFindFileData
)
{
WININET_find_data_WtoA
(
lpFindFileDataW
,
lpFindFileData
);
...
...
@@ -907,7 +907,7 @@ HINTERNET WINAPI FtpOpenFileA(HINTERNET hFtpSession,
lpwzFileName
=
lpszFileName
?
WININET_strdup_AtoW
(
lpszFileName
)
:
NULL
;
ret
=
FtpOpenFileW
(
hFtpSession
,
lpwzFileName
,
fdwAccess
,
dwFlags
,
dwContext
);
if
(
lpwzFileName
)
HeapFree
(
GetProcessHeap
(),
0
,
lpwzFileName
);
HeapFree
(
GetProcessHeap
(),
0
,
lpwzFileName
);
return
ret
;
}
...
...
@@ -1086,8 +1086,8 @@ BOOL WINAPI FtpGetFileA(HINTERNET hInternet, LPCSTR lpszRemoteFile, LPCSTR lpszN
lpwzNewFile
=
lpszNewFile
?
WININET_strdup_AtoW
(
lpszNewFile
)
:
NULL
;
ret
=
FtpGetFileW
(
hInternet
,
lpwzRemoteFile
,
lpwzNewFile
,
fFailIfExists
,
dwLocalFlagsAttribute
,
dwInternetFlags
,
dwContext
);
if
(
lpwzRemoteFile
)
HeapFree
(
GetProcessHeap
(),
0
,
lpwzRemoteFile
);
if
(
lpwzNewFile
)
HeapFree
(
GetProcessHeap
(),
0
,
lpwzNewFile
);
HeapFree
(
GetProcessHeap
(),
0
,
lpwzRemoteFile
);
HeapFree
(
GetProcessHeap
(),
0
,
lpwzNewFile
);
return
ret
;
}
...
...
@@ -1251,7 +1251,7 @@ BOOL WINAPI FtpDeleteFileA(HINTERNET hFtpSession, LPCSTR lpszFileName)
lpwzFileName
=
lpszFileName
?
WININET_strdup_AtoW
(
lpszFileName
)
:
NULL
;
ret
=
FtpDeleteFileW
(
hFtpSession
,
lpwzFileName
);
if
(
lpwzFileName
)
HeapFree
(
GetProcessHeap
(),
0
,
lpwzFileName
);
HeapFree
(
GetProcessHeap
(),
0
,
lpwzFileName
);
return
ret
;
}
...
...
@@ -1370,7 +1370,7 @@ BOOL WINAPI FtpRemoveDirectoryA(HINTERNET hFtpSession, LPCSTR lpszDirectory)
lpwzDirectory
=
lpszDirectory
?
WININET_strdup_AtoW
(
lpszDirectory
)
:
NULL
;
ret
=
FtpRemoveDirectoryW
(
hFtpSession
,
lpwzDirectory
);
if
(
lpwzDirectory
)
HeapFree
(
GetProcessHeap
(),
0
,
lpwzDirectory
);
HeapFree
(
GetProcessHeap
(),
0
,
lpwzDirectory
);
return
ret
;
}
...
...
@@ -1492,8 +1492,8 @@ BOOL WINAPI FtpRenameFileA(HINTERNET hFtpSession, LPCSTR lpszSrc, LPCSTR lpszDes
lpwzSrc
=
lpszSrc
?
WININET_strdup_AtoW
(
lpszSrc
)
:
NULL
;
lpwzDest
=
lpszDest
?
WININET_strdup_AtoW
(
lpszDest
)
:
NULL
;
ret
=
FtpRenameFileW
(
hFtpSession
,
lpwzSrc
,
lpwzDest
);
if
(
lpwzSrc
)
HeapFree
(
GetProcessHeap
(),
0
,
lpwzSrc
);
if
(
lpwzDest
)
HeapFree
(
GetProcessHeap
(),
0
,
lpwzDest
);
HeapFree
(
GetProcessHeap
(),
0
,
lpwzSrc
);
HeapFree
(
GetProcessHeap
(),
0
,
lpwzDest
);
return
ret
;
}
...
...
dlls/wininet/http.c
View file @
7cb43c9d
...
...
@@ -477,10 +477,10 @@ end:
}
HeapFree
(
GetProcessHeap
(),
0
,
szAcceptTypes
);
}
if
(
szReferrer
)
HeapFree
(
GetProcessHeap
(),
0
,
szReferrer
);
if
(
szVersion
)
HeapFree
(
GetProcessHeap
(),
0
,
szVersion
);
if
(
szObjectName
)
HeapFree
(
GetProcessHeap
(),
0
,
szObjectName
);
if
(
szVerb
)
HeapFree
(
GetProcessHeap
(),
0
,
szVerb
);
HeapFree
(
GetProcessHeap
(),
0
,
szReferrer
);
HeapFree
(
GetProcessHeap
(),
0
,
szVersion
);
HeapFree
(
GetProcessHeap
(),
0
,
szObjectName
);
HeapFree
(
GetProcessHeap
(),
0
,
szVerb
);
return
rc
;
}
...
...
@@ -1738,7 +1738,7 @@ BOOL WINAPI HTTP_HttpSendRequestW(LPWININETHTTPREQW lpwhr, LPCWSTR lpszHeaders,
HeapFree
(
GetProcessHeap
(),
0
,
buf_url
);
HeapFree
(
GetProcessHeap
(),
0
,
buf_cookie
);
HeapFree
(
GetProcessHeap
(),
0
,
cookie_name
);
if
(
domain
)
HeapFree
(
GetProcessHeap
(),
0
,
domain
);
HeapFree
(
GetProcessHeap
(),
0
,
domain
);
nPosStart
=
nPosEnd
;
}
}
...
...
@@ -1747,8 +1747,7 @@ BOOL WINAPI HTTP_HttpSendRequestW(LPWININETHTTPREQW lpwhr, LPCWSTR lpszHeaders,
lend:
if
(
requestString
)
HeapFree
(
GetProcessHeap
(),
0
,
requestString
);
HeapFree
(
GetProcessHeap
(),
0
,
requestString
);
/* TODO: send notification for P3P header */
...
...
dlls/wininet/internet.c
View file @
7cb43c9d
...
...
@@ -299,8 +299,7 @@ BOOL WINAPI DllMain (HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
if
(
g_dwTlsErrIndex
!=
TLS_OUT_OF_INDEXES
)
{
LPVOID
lpwite
=
TlsGetValue
(
g_dwTlsErrIndex
);
if
(
lpwite
)
HeapFree
(
GetProcessHeap
(),
0
,
lpwite
);
HeapFree
(
GetProcessHeap
(),
0
,
lpwite
);
}
break
;
...
...
@@ -587,12 +586,9 @@ HINTERNET WINAPI InternetOpenA(LPCSTR lpszAgent, DWORD dwAccessType,
rc
=
InternetOpenW
(
szAgent
,
dwAccessType
,
szProxy
,
szBypass
,
dwFlags
);
if
(
szAgent
)
HeapFree
(
GetProcessHeap
(),
0
,
szAgent
);
if
(
szProxy
)
HeapFree
(
GetProcessHeap
(),
0
,
szProxy
);
if
(
szBypass
)
HeapFree
(
GetProcessHeap
(),
0
,
szBypass
);
HeapFree
(
GetProcessHeap
(),
0
,
szAgent
);
HeapFree
(
GetProcessHeap
(),
0
,
szProxy
);
HeapFree
(
GetProcessHeap
(),
0
,
szBypass
);
return
rc
;
}
...
...
@@ -819,9 +815,9 @@ HINTERNET WINAPI InternetConnectA(HINTERNET hInternet,
rc
=
InternetConnectW
(
hInternet
,
szServerName
,
nServerPort
,
szUserName
,
szPassword
,
dwService
,
dwFlags
,
dwContext
);
if
(
szServerName
)
HeapFree
(
GetProcessHeap
(),
0
,
szServerName
);
if
(
szUserName
)
HeapFree
(
GetProcessHeap
(),
0
,
szUserName
);
if
(
szPassword
)
HeapFree
(
GetProcessHeap
(),
0
,
szPassword
);
HeapFree
(
GetProcessHeap
(),
0
,
szServerName
);
HeapFree
(
GetProcessHeap
(),
0
,
szUserName
);
HeapFree
(
GetProcessHeap
(),
0
,
szPassword
);
return
rc
;
}
...
...
@@ -2349,7 +2345,7 @@ HINTERNET WINAPI InternetOpenUrlA(HINTERNET hInternet, LPCSTR lpszUrl,
lenHeaders
=
MultiByteToWideChar
(
CP_ACP
,
0
,
lpszHeaders
,
dwHeadersLength
,
NULL
,
0
);
szHeaders
=
HeapAlloc
(
GetProcessHeap
(),
0
,
lenHeaders
*
sizeof
(
WCHAR
));
if
(
!
szHeaders
)
{
if
(
szUrl
)
HeapFree
(
GetProcessHeap
(),
0
,
szUrl
);
HeapFree
(
GetProcessHeap
(),
0
,
szUrl
);
return
(
HINTERNET
)
NULL
;
}
MultiByteToWideChar
(
CP_ACP
,
0
,
lpszHeaders
,
dwHeadersLength
,
szHeaders
,
lenHeaders
);
...
...
@@ -2358,8 +2354,8 @@ HINTERNET WINAPI InternetOpenUrlA(HINTERNET hInternet, LPCSTR lpszUrl,
rc
=
InternetOpenUrlW
(
hInternet
,
szUrl
,
szHeaders
,
lenHeaders
,
dwFlags
,
dwContext
);
if
(
szUrl
)
HeapFree
(
GetProcessHeap
(),
0
,
szUrl
);
if
(
szHeaders
)
HeapFree
(
GetProcessHeap
(),
0
,
szHeaders
);
HeapFree
(
GetProcessHeap
(),
0
,
szUrl
);
HeapFree
(
GetProcessHeap
(),
0
,
szHeaders
);
return
rc
;
}
...
...
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