File at-3.1.13-leak-fix.patch of Package at.8355

Index: at.c
===================================================================
--- at.c.orig
+++ at.c
@@ -616,10 +616,13 @@ list_jobs(long *joblist, int len)
 	if ((pwd = getpwuid(buf.st_uid)))
 	  printf("%ld\t%s %c %s\n", jobno, timestr, queue, pwd->pw_name);
 	else
 	  printf("%ld\t%s %c\n", jobno, timestr, queue);
     }
+    
+    closedir(spool);
+    
     PRIV_END
 }
 
 static int
 process_jobs(int argc, char **argv, int what)
@@ -698,10 +701,11 @@ process_jobs(int argc, char **argv, int
 			if (fp) {
 			    while ((ch = getc(fp)) != EOF) {
 				putchar(ch);
 			    }
 			    done = 1;
+			    fclose(fp);
 			}
 			else {
 			    perr("Cannot open %.500s", dirent->d_name);
 			    rc = EXIT_FAILURE;
 			}
openSUSE Build Service is sponsored by