*fix* 2 memleaks

*fix* no more warnings


git-svn-id: http://tint2.googlecode.com/svn/trunk@335 121b4492-b84c-0410-8b4c-0d4edfb3f3cc
This commit is contained in:
Andreas.Fink85
2010-01-10 22:16:27 +00:00
parent f9a7bb8b1e
commit 06518a0f4b
8 changed files with 44 additions and 35 deletions

View File

@@ -44,7 +44,9 @@ void copy_file(const char *pathSrc, const char *pathDest)
fileDest = fopen(pathDest, "wb");
if (fileDest == NULL) return;
while ((nb = fread(line, 1, 100, fileSrc)) > 0) fwrite(line, 1, nb, fileDest);
while ((nb = fread(line, 1, 100, fileSrc)) > 0)
if ( nb != fwrite(line, 1, nb, fileDest))
printf("Error while copying file %s to %s\n", pathSrc, pathDest);
fclose (fileDest);
fclose (fileSrc);