[vlc-commits] posix: use vlc_alloc helper
Thomas Guillem
git at videolan.org
Sat Nov 11 17:22:01 CET 2017
vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Sat Nov 11 17:18:28 2017 +0100| [5b8a7386b5811b79cc9b9d7a10e48e3708f2a540] | committer: Thomas Guillem
posix: use vlc_alloc helper
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5b8a7386b5811b79cc9b9d7a10e48e3708f2a540
---
src/posix/thread.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/posix/thread.c b/src/posix/thread.c
index 9490683991..dab8b71f97 100644
--- a/src/posix/thread.c
+++ b/src/posix/thread.c
@@ -698,7 +698,7 @@ unsigned vlc_GetCPUCount(void)
u_int numcpus;
processor_info_t cpuinfo;
- processorid_t *cpulist = malloc (sizeof (*cpulist) * sysconf(_SC_NPROCESSORS_MAX));
+ processorid_t *cpulist = vlc_alloc (sysconf(_SC_NPROCESSORS_MAX), sizeof (*cpulist));
if (unlikely(cpulist == NULL))
return 1;
More information about the vlc-commits
mailing list