296099
diff -up libpaper-1.1.24+nmu5/lib/paper.c.file-leak libpaper-1.1.24+nmu5/lib/paper.c
296099
--- libpaper-1.1.24+nmu5/lib/paper.c.file-leak	2018-03-09 16:21:01.028345956 +0100
296099
+++ libpaper-1.1.24+nmu5/lib/paper.c	2018-03-09 16:40:57.824279357 +0100
296099
@@ -140,7 +140,7 @@ char* systempapername(void) {
296099
     char* paperstr;
296099
     char* paperenv;
296099
     const char* paperdef;
296099
-    FILE* ps;
296099
+    FILE* ps = NULL;
296099
     struct stat statbuf;
296099
     const struct paper* pp;
296099
     int c;
296099
@@ -224,6 +224,9 @@ PAPERSIZEVAR, fall-back to the old behav
296099
 	}
296099
     } 
296099
       
296099
+    if (ps)
296099
+      fclose(ps);
296099
+
296099
     paperdef = defaultpapername();
296099
     paperstr = malloc((strlen(paperdef) + 1) * sizeof(char));
296099