diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-09-04 09:50:31 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-09-04 09:50:31 -0700 |
commit | a57668127eb0e00bc467ae0fc487592e95c17227 (patch) | |
tree | 6327050c7ba39bf1cd7b883d8306fcab2c141dca | |
parent | a6b9eaee0aa2ff67482560f4401e0dc6f2c79237 (diff) | |
download | subsurface-a57668127eb0e00bc467ae0fc487592e95c17227.tar.gz |
Oops. I forgot to 'fclose()' the file after saving the xml
It never actually triggered anything for me, but any buffered data might
be lost, especially if you force-exit the application after saving a
dive log.
This probably explains a corrupted (truncated) dive file report from
Nathan Samson.
Reported-by: Nathan Samson <https://github.com/nathansamson>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | save-xml.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/save-xml.c b/save-xml.c index 9e3640cad..5c05723b7 100644 --- a/save-xml.c +++ b/save-xml.c @@ -193,4 +193,5 @@ void save_dives(const char *filename) for (i = 0; i < dive_table.nr; i++) save_dive(f, get_dive(i)); fprintf(f, "</dives>\n"); + fclose(f); } |