summaryrefslogtreecommitdiff
path: root/apps/buffering.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/buffering.c')
-rw-r--r--apps/buffering.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/apps/buffering.c b/apps/buffering.c
index e39a4b6eca..a821e7f8c7 100644
--- a/apps/buffering.c
+++ b/apps/buffering.c
@@ -944,11 +944,11 @@ int bufopen(const char *file, size_t offset, enum data_type type)
944 int rc; 944 int rc;
945 mutex_lock(&llist_mutex); /* Lock because load_bitmap yields */ 945 mutex_lock(&llist_mutex); /* Lock because load_bitmap yields */
946 rc = load_bitmap(fd); 946 rc = load_bitmap(fd);
947 mutex_unlock(&llist_mutex);
947 if (rc <= 0) 948 if (rc <= 0)
948 { 949 {
949 rm_handle(h); 950 rm_handle(h);
950 close(fd); 951 close(fd);
951 mutex_unlock(&llist_mutex);
952 return ERR_FILE_ERROR; 952 return ERR_FILE_ERROR;
953 } 953 }
954 h->filerem = 0; 954 h->filerem = 0;
@@ -956,7 +956,6 @@ int bufopen(const char *file, size_t offset, enum data_type type)
956 h->available = rc; 956 h->available = rc;
957 h->widx = buf_widx + rc; /* safe because the data doesn't wrap */ 957 h->widx = buf_widx + rc; /* safe because the data doesn't wrap */
958 buf_widx += rc; /* safe too */ 958 buf_widx += rc; /* safe too */
959 mutex_unlock(&llist_mutex);
960 } 959 }
961 else 960 else
962#endif 961#endif