pthreadpool: Fix CID 710828 Sizeof not portable
authorVolker Lendecke <vl@samba.org>
Sun, 12 May 2013 10:44:41 +0000 (12:44 +0200)
committerVolker Lendecke <vl@samba.org>
Sun, 12 May 2013 13:56:32 +0000 (15:56 +0200)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ira Cooper <ira@samba.org>
source3/lib/pthreadpool/pthreadpool.c

index 04303776a2fec11572f4a99ae66d08de7b27f952..c5c9367da16fed9260b96e9aa7ad563355332902 100644 (file)
@@ -407,7 +407,7 @@ static void pthreadpool_server_exit(struct pthreadpool *pool)
        pool->num_threads -= 1;
 
        exited = (pthread_t *)realloc(
-               pool->exited, sizeof(pthread_t *) * (pool->num_exited + 1));
+               pool->exited, sizeof(pthread_t) * (pool->num_exited + 1));
 
        if (exited == NULL) {
                /* lost a thread status */