Malloc to stock file. But Segfault when try to show it