close file pointer before exiting function
[project/ubox.git] / block.c
diff --git a/block.c b/block.c
index c9285d642ad8346bbb10dede5c9df2af99828ded..2289b779a7a485642789cfc303091ee19a0f4b7a 100644 (file)
--- a/block.c
+++ b/block.c
@@ -545,8 +545,10 @@ static char* find_mount_point(char *block)
                        char *p = &line[len + 1];
                        char *t = strstr(p, " ");
 
-                       if (!t)
+                       if (!t) {
+                               fclose(fp);
                                return NULL;
+                       }
                        *t = '\0';
                        point = p;
                        break;