projects
/
reactos.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
15f4004
)
[EPSAPI]
author
Pierre Schweitzer
<pierre@reactos.org>
Sat, 5 Apr 2014 09:17:21 +0000
(09:17 +0000)
committer
Pierre Schweitzer
<pierre@reactos.org>
Sat, 5 Apr 2014 09:17:21 +0000
(09:17 +0000)
Fix double free in PsaCaptureSystemModules()
CID #
1106329
svn path=/trunk/; revision=62614
reactos/lib/epsapi/enum/drivers.c
patch
|
blob
|
history
diff --git
a/reactos/lib/epsapi/enum/drivers.c
b/reactos/lib/epsapi/enum/drivers.c
index
fa87c54
..
9fdbe93
100644
(file)
--- a/
reactos/lib/epsapi/enum/drivers.c
+++ b/
reactos/lib/epsapi/enum/drivers.c
@@
-100,6
+100,7
@@
PsaCaptureSystemModules(OUT PRTL_PROCESS_MODULES *SystemModules)
ignore the buffer's content at this point, there's no point in a realloc,
that could end up copying a large chunk of data we'd discard anyway */
PsaiFree(psmModules);
+ psmModules = NULL;
pTmp = PsaiMalloc(nSize);
if(pTmp == NULL)
@@
-138,7
+139,7
@@
PsaCaptureSystemModules(OUT PRTL_PROCESS_MODULES *SystemModules)
} while(0);
#endif
/* in case of failure, free the buffer */
- if(!NT_SUCCESS(Status))
+ if(!NT_SUCCESS(Status)
&& psmModules != NULL
)
{
PsaiFree(psmModules);
}