GlibC Double free or corruption (fclose)
问题 I got an error on my C program on runtime. I found some stuff about "double free or corruption" error but nothing relevant. Here is my code : void compute_crc32(const char* filename, unsigned long * destination) { FILE* tmp_chunk = fopen(filename, "rb"); printf("\n\t\t\tCalculating CRC..."); fflush(stdout); Crc32_ComputeFile(tmp_chunk, destination); printf("\t[0x%08lX]", *destination); fflush(stdout); fclose(tmp_chunk); printf("\t[ OK ]"); fflush(stdout); } It seems the fclose(tmp_chunk);