gix handle leak on write failure

This commit is contained in:
Richard Frith-Macdonald 2018-01-30 07:26:05 +00:00
parent 6b1f8f7962
commit ba7c5086d1

View file

@ -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;
}