mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
gix handle leak on write failure
This commit is contained in:
parent
6b1f8f7962
commit
ba7c5086d1
1 changed files with 2 additions and 2 deletions
|
@ -1873,10 +1873,10 @@ failure:
|
|||
* in the fwrite() call. */
|
||||
c = fwrite([self bytes], sizeof(char), [self length], theFile);
|
||||
|
||||
if (c < (int)[self length]) /* We failed to write everything for
|
||||
* some reason. */
|
||||
if (c < (int)[self length]) /* We failed to write everything. */
|
||||
{
|
||||
NSWarnMLog(@"Fwrite (%s) failed - %@", thePath, [NSError _last]);
|
||||
fclose(theFile);
|
||||
goto failure;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue