*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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user