]> git.proxmox.com Git - mirror_edk2.git/blobdiff - StdLib/LibC/Stdio/fseeko.c
Add Socket Libraries.
[mirror_edk2.git] / StdLib / LibC / Stdio / fseeko.c
index 7fc7e426616f428cbc62a14d89ce173da9dadad6..662d25f91a3ded9631e2bfafea7ce92cc3505f66 100644 (file)
@@ -238,6 +238,7 @@ fseeko(FILE *fp, off_t offset, int whence)
     fp->_r = (int)(n - o);\r
     if (HASUB(fp))\r
       FREEUB(fp);\r
+    WCIO_FREE(fp);    /* Should this really be unconditional??? */\r
     fp->_flags &= ~__SEOF;\r
     FUNLOCKFILE(fp);\r
     return (0);\r
@@ -261,6 +262,7 @@ fseeko(FILE *fp, off_t offset, int whence)
   fp->_p = fp->_bf._base;\r
   if (HASUB(fp))\r
     FREEUB(fp);\r
+  WCIO_FREE(fp);    /* Should this really be unconditional??? */\r
   fp->_flags &= ~__SEOF;\r
   n = (int)(target - curoff);\r
   if (n) {\r
@@ -290,9 +292,10 @@ dumb:
   /* success: clear EOF indicator and discard ungetc() data */\r
   if (HASUB(fp))\r
     FREEUB(fp);\r
+  WCIO_FREE(fp);    /* Should this really be unconditional??? */\r
   fp->_p = fp->_bf._base;\r
   fp->_r = 0;\r
-  /* fp->_w = 0; */ /* unnecessary (I think...) */\r
+  fp->_w = 0;\r
   fp->_flags &= ~__SEOF;\r
   FUNLOCKFILE(fp);\r
 //Print(L"%a: %d\n", __func__, __LINE__);\r