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