src/medit/image.c:33: error: RESOURCE_LEAK resource of type `_IO_FILE` acquired by call to `fopen()` at line 20, column 10 is not released after line 33, column 13. Showing all 8 steps of the trace src/medit/image.c:6:1: start of procedure loadPPM() 4. 5. 6. > PPMimage *loadPPM(const char *imgname,int *type) { 7. pPPMimage result; 8. FILE *fp; src/medit/image.c:13:3: 11. 12. /* search for image */ 13. > ptr = strstr(imgname,".ppm"); 14. if ( !ptr ) { 15. strcpy(data,imgname); src/medit/image.c:14:9: Taking false branch 12. /* search for image */ 13. ptr = strstr(imgname,".ppm"); 14. if ( !ptr ) { ^ 15. strcpy(data,imgname); 16. strcat(data,".ppm"); src/medit/image.c:20:5: 18. } 19. else 20. > fp = fopen(imgname,"rb"); 21. if ( !fp ) { 22. fprintf(stderr," ## Unable to open file %s.\n",imgname); src/medit/image.c:21:9: Taking false branch 19. else 20. fp = fopen(imgname,"rb"); 21. if ( !fp ) { ^ 22. fprintf(stderr," ## Unable to open file %s.\n",imgname); 23. return(0); src/medit/image.c:26:9: Taking false branch 24. } 25. 26. if ( !fgets(buff,sizeof(buff),fp) ) { ^ 27. fprintf(stderr," ## Invalid file header.\n"); 28. return(0); src/medit/image.c:32:8: Taking true branch 30. 31. /* check header file */ 32. if ( buff[0] != 'P' ) { ^ 33. fprintf(stderr," ## Invalid image format.\n"); 34. return(0); src/medit/image.c:33:5: 31. /* check header file */ 32. if ( buff[0] != 'P' ) { 33. > fprintf(stderr," ## Invalid image format.\n"); 34. return(0); 35. }