Search
lxdream.org :: lxdream/src/vmu/vmuvol.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/vmu/vmuvol.c
changeset 1056:d0896e6530d6
prev1045:0c46bac28888
next1071:182cfe43c09e
author nkeynes
date Sun Jun 28 12:07:21 2009 +0000 (11 years ago)
permissions -rw-r--r--
last change Fix handling of rename failure
Fix boneheadedness in get_filename_at
file annotate diff log raw
1.1 --- a/src/vmu/vmuvol.c Sat Jun 27 10:09:21 2009 +0000
1.2 +++ b/src/vmu/vmuvol.c Sun Jun 28 12:07:21 2009 +0000
1.3 @@ -239,6 +239,7 @@
1.4 fseek( f, end, SEEK_SET );
1.5 }
1.6 fclose(f);
1.7 + f = NULL;
1.8
1.9 if( rename(tempfile, filename) != 0 )
1.10 goto cleanup;
1.11 @@ -249,7 +250,8 @@
1.12 return TRUE;
1.13
1.14 cleanup:
1.15 - fclose(f);
1.16 + if( f != NULL )
1.17 + fclose(f);
1.18 unlink(tempfile);
1.19 g_free(tempfile);
1.20 return FALSE;
.