shell.c proper malloc()s added