git://git.novaco.in
/
novacoin.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
32983bf
)
Close file if fseek failed
347/head
author
svost
<svost@users.noreply.github.com>
Sun, 8 May 2016 20:54:46 +0000 (23:54 +0300)
committer
svost
<svost@users.noreply.github.com>
Sun, 8 May 2016 20:54:46 +0000 (23:54 +0300)
src/main.cpp
patch
|
blob
|
history
diff --git
a/src/main.cpp
b/src/main.cpp
index
48de169
..
98c2105
100644
(file)
--- a/
src/main.cpp
+++ b/
src/main.cpp
@@
-2677,7
+2677,10
@@
FILE* AppendBlockFile(unsigned int& nFileRet)
if (!file)
return NULL;
if (fseek(file, 0, SEEK_END) != 0)
+ {
+ fclose(file);
return NULL;
+ }
// FAT32 file size max 4GB, fseek and ftell max 2GB, so we must stay under 2GB
if (ftell(file) < (long)(0x7F000000 - MAX_SIZE))
{