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