09feeab2a6
OBS-URL: https://build.opensuse.org/package/show/Base:System/at?expand=0&rev=53100d87b42901e6f6ab596e79dac7ab
40 lines
682 B
Diff
40 lines
682 B
Diff
--- 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;
|