commit 0c0c86508828681e38e6f74a8aa18c6b3e8c094f
Author: lawl <lawl@users.noreply.github.com>
Date:   Tue Sep 1 23:03:52 2015 +0200

    Fix undefined behaviour, free() incremented pointer
    
    We shouldn't free() template since the pointer won't match the allocation anymore. This is undefined behaviour. So we increment a copy of the pointer and then free() the original one.
    
    Editing this from the web here, please double check if it compiles correctly :)
