removed malloc from edgedetect.c