Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bugfix: motion.c: calculate proper allocation size
The proper idiom for calculating the size for memory allocation is: ptr = malloc(sizeof(*ptr)); The sizeof() dereferences the pointer's type, and allocates enough memory to store an instance of that type. motion.c was using this idiom: ptr = malloc(sizeof(ptr)); This is incorrect, but thankfully fairly harmless in practice since the pointer type is usually quite large. Change this to the proper idiom.
- Loading branch information