summaryrefslogtreecommitdiff
path: root/src/lib/evil
diff options
context:
space:
mode:
authorVincent Torri <vincent.torri@gmail.com>2015-04-26 16:38:10 +0200
committerCedric BAIL <cedric@osg.samsung.com>2015-05-07 09:53:12 +0200
commit00a3de5c1f3268c9b7c98e5be39c3947b105ee6e (patch)
tree9c2be3d0dd563e654b1dc70886d8fd32de80d436 /src/lib/evil
parentf2aec7ae4b04e039221ed7b1b8f7eb7e427447c8 (diff)
evil: fix mem leak in dlsym() when using UNICODE
@fix Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Diffstat (limited to 'src/lib/evil')
-rw-r--r--src/lib/evil/dlfcn.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/lib/evil/dlfcn.c b/src/lib/evil/dlfcn.c
index 4efc91bcd8..c220003de6 100644
--- a/src/lib/evil/dlfcn.c
+++ b/src/lib/evil/dlfcn.c
@@ -144,7 +144,13 @@ dlsym(void *handle, const char *symbol)
144 /* TODO: use EnumProcessModulesEx() on Windows >= Vista */ 144 /* TODO: use EnumProcessModulesEx() on Windows >= Vista */
145 if (!EnumProcessModules(GetCurrentProcess(), 145 if (!EnumProcessModules(GetCurrentProcess(),
146 modules, sizeof(modules), &needed)) 146 modules, sizeof(modules), &needed))
147 return NULL; 147 {
148#ifdef UNICODE
149 _dl_get_last_error("EnumProcessModules returned: ");
150 free((void *)new_symbol);
151#endif /* UNICODE */
152 return NULL;
153 }
148 154
149 for (i = 0; i < (needed / sizeof(HMODULE)); i++) 155 for (i = 0; i < (needed / sizeof(HMODULE)); i++)
150 { 156 {