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

--- at.c.orig	2009-08-27 11:22:49.000000000 +0200
+++ at.c	2009-08-27 12:12:58.000000000 +0200
@@ -600,6 +600,9 @@
 	else
 	  printf("%ld\t%s %c\n", jobno, timestr, queue);
     }
+    
+    closedir(spool);
+    
     PRIV_END
 }
 
@@ -676,6 +679,11 @@
 			while ((ch = getc(fp)) != EOF) {
 			    putchar(ch);
 			}
+			PRIV_START
+			if (fp!=NULL) {
+			    fclose(fp);
+			}
+			PRIV_END
 		    }
 		    break;
 
@@ -687,7 +695,13 @@
 		}
 	    }
 	}
-    }
+	}
+	
+	PRIV_START
+	if (spool!=NULL) {
+		closedir(spool);
+	}
+	PRIV_END
 }				/* delete_jobs */
 
 #define ATOI2(ar)       ((ar)[0] - '0') * 10 + ((ar)[1] - '0'); (ar) += 2;
openSUSE Build Service is sponsored by