BUGFIX in allocation

Their was an error of cast inside mem_alloc function. With that fix,
valgrind is pleased :)
MINOR: remove useless coment