File opie-2.4-fclose.patch of Package opie

--- permsfile.c
+++ permsfile.c
@@ -154,10 +154,14 @@
     return;
   }
   do {
-    if (feof(fh))
+    if (feof(fh)) {
+      fclose(fh);
       return;
-    if (fgets(buf, BUFSIZE, fh) == NULL)
+    }
+    if (fgets(buf, BUFSIZE, fh) == NULL) {
+      fclose(fh);
       return;
+    }
     buf[BUFSIZE-1] = 0;
 
     doaline(buf, name, ttyn, uid, gid);
openSUSE Build Service is sponsored by