Nikolay Sivov : msvcrt/tests: Free temporary file name after test.

Alexandre Julliard julliard at winehq.org
Mon Dec 7 10:26:15 CST 2009


Module: wine
Branch: master
Commit: e5e17ca438475fcc95bad6171e9c35dff583100d
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=e5e17ca438475fcc95bad6171e9c35dff583100d

Author: Nikolay Sivov <bunglehead at gmail.com>
Date:   Sun Dec  6 18:58:28 2009 +0300

msvcrt/tests: Free temporary file name after test.

---

 dlls/msvcrt/tests/file.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/dlls/msvcrt/tests/file.c b/dlls/msvcrt/tests/file.c
index e652985..e164555 100644
--- a/dlls/msvcrt/tests/file.c
+++ b/dlls/msvcrt/tests/file.c
@@ -439,6 +439,7 @@ static void test_fgetc( void )
   ok(ich == ret, "Second fgetc expected %x got %x\n", ich, ret);
   fclose(tempfh);
   unlink(tempf);
+  free(tempf);
 }
 
 static void test_fputc( void )
@@ -463,6 +464,7 @@ static void test_fputc( void )
   fclose(tempfh);
 
   unlink(tempf);
+  free(tempf);
 }
 
 static void test_flsbuf( void )
@@ -517,6 +519,7 @@ static void test_flsbuf( void )
   fclose(tempfh);
 
   unlink(tempf);
+  free(tempf);
 }
 
 static void test_fgetwc( void )
@@ -634,6 +637,7 @@ static void test_fgetwc( void )
   free(mytextW);
   fclose(tempfh);
   unlink(tempf);
+  free(tempf);
 }
 
 static void test_ctrlz( void )
@@ -681,6 +685,7 @@ static void test_ctrlz( void )
   ok(feof(tempfh), "did not get EOF\n");
   fclose(tempfh);
   unlink(tempf);
+  free(tempf);
 }
 
 static void test_file_put_get( void )
@@ -730,6 +735,7 @@ static void test_file_put_get( void )
   free(mytextW);
   fclose(tempfh);
   unlink(tempf);
+  free(tempf);
 }
 
 static void test_file_write_read( void )
@@ -806,6 +812,7 @@ static void test_file_write_read( void )
 
   ret = unlink(tempf);
   ok( ret == 0 ,"Can't unlink '%s': %d\n", tempf, errno);
+  free(tempf);
 
   tempf=_tempnam(".","wne");
   tempfd = _open(tempf,_O_CREAT|_O_TRUNC|_O_BINARY|_O_RDWR,0);
@@ -833,6 +840,7 @@ static void test_file_write_read( void )
      "Can't chmod '%s' to read-write: %d\n", tempf, errno);
   ret = unlink(tempf);
   ok( ret == 0 ,"Can't unlink '%s': %d\n", tempf, errno);
+  free(tempf);
 }
 
 static void test_file_inherit_child(const char* fd_s)
@@ -1080,6 +1088,7 @@ static void test_chsize( void )
 
     _close( fd );
     _unlink( tempfile );
+    free( tempfile );
 }
 
 static void test_fopen_fclose_fcloseall( void )




More information about the wine-cvs mailing list