gnuchess/gnuchess-5.07-fix-missing-fclose.patch
OBS User autobuild 1477cb1c96 Accepting request 29535 from games
Copy from games/gnuchess based on submit request 29535 from user coolo

OBS-URL: https://build.opensuse.org/request/show/29535
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/gnuchess?expand=0&rev=4
2010-01-14 17:28:49 +00:00

18 lines
458 B
Diff

Index: src/book.c
===================================================================
--- src/book.c.orig
+++ src/book.c
@@ -343,9 +343,11 @@ int BookBuilderOpen(void)
}
digest_bits = MAX_DIGEST_BITS;
/* We use read_book() here only to allocate memory */
- if (read_book(wfp) == BOOK_ENOMEM) {
+ if (read_book(rfp) == BOOK_ENOMEM) {
+ fclose(rfp);
return BOOK_ENOMEM;
}
+ fclose(rfp);
}
return BOOK_SUCCESS;
}