1477cb1c96
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
18 lines
458 B
Diff
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;
|
|
}
|