[CRT]
authorPierre Schweitzer <pierre@reactos.org>
Fri, 4 Sep 2015 16:49:51 +0000 (16:49 +0000)
committerPierre Schweitzer <pierre@reactos.org>
Fri, 4 Sep 2015 16:49:51 +0000 (16:49 +0000)
Fix memory allocation in __dllonexit

CID 514138

svn path=/trunk/; revision=69006

reactos/lib/sdk/crt/stdlib/atexit.c

index 5ed0fc0..6e52c66 100644 (file)
@@ -44,7 +44,7 @@ _onexit_t CDECL __dllonexit(_onexit_t func, _onexit_t **start, _onexit_t **end)
   if (++len <= 0)
     return NULL;
 
-  tmp = realloc(*start, len * sizeof(tmp));
+  tmp = realloc(*start, len * sizeof(_onexit_t));
   if (!tmp)
     return NULL;
   *start = tmp;