File at-3.1.8-leak-fix.patch of Package at.import4150

--- at.c.orig
+++ at.c
@@ -600,6 +600,9 @@ list_jobs(long *joblist, int len)
 	else
 	  printf("%ld\t%s %c\n", jobno, timestr, queue);
     }
+    
+    closedir(spool);
+    
     PRIV_END
 }
 
@@ -676,6 +679,11 @@ process_jobs(int argc, char **argv, int
 			while ((ch = getc(fp)) != EOF) {
 			    putchar(ch);
 			}
+			PRIV_START
+			if (fp!=NULL) {
+			    fclose(fp);
+			}
+			PRIV_END
 		    }
 		    break;
 
@@ -687,7 +695,13 @@ process_jobs(int argc, char **argv, int
 		}
 	    }
 	}
-    }
+	}
+	
+	PRIV_START
+	if (spool!=NULL) {
+		closedir(spool);
+	}
+	PRIV_END
 }				/* delete_jobs */
 
 #define ATOI2(ar)       ((ar)[0] - '0') * 10 + ((ar)[1] - '0'); (ar) += 2;