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