projects
/
platform
/
upstream
/
freerdp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e77a4fe
)
Fixed memory leak.
author
Armin Novak
<armin.novak@gmail.com>
Sun, 16 Nov 2014 16:07:48 +0000
(17:07 +0100)
committer
Armin Novak
<armin.novak@gmail.com>
Sun, 16 Nov 2014 16:07:48 +0000
(17:07 +0100)
winpr/libwinpr/sspi/NTLM/ntlm.c
patch
|
blob
|
history
diff --git
a/winpr/libwinpr/sspi/NTLM/ntlm.c
b/winpr/libwinpr/sspi/NTLM/ntlm.c
index
9807460
..
34f6700
100644
(file)
--- a/
winpr/libwinpr/sspi/NTLM/ntlm.c
+++ b/
winpr/libwinpr/sspi/NTLM/ntlm.c
@@
-198,7
+198,10
@@
NTLM_CONTEXT* ntlm_ContextNew()
char* workstation = (char*) malloc(dwSize + 1);
if (!workstation)
+ {
+ free (context);
return NULL;
+ }
status = RegQueryValueExA(hKey, "WorkstationName", NULL, &dwType, (BYTE*) workstation, &dwSize);
workstation[dwSize] = '\0';
@@
-206,8
+209,7
@@
NTLM_CONTEXT* ntlm_ContextNew()
if (ntlm_SetContextWorkstation(context, workstation) < 0)
{
free(workstation);
- if (context)
- free(context);
+ free(context);
return NULL;
}