diff options
Diffstat (limited to 'libbb/copyfd.c')
-rw-r--r-- | libbb/copyfd.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/libbb/copyfd.c b/libbb/copyfd.c index aa8fbb967..3255e424a 100644 --- a/libbb/copyfd.c +++ b/libbb/copyfd.c | |||
@@ -14,14 +14,13 @@ | |||
14 | #define BUFSIZ 4096 | 14 | #define BUFSIZ 4096 |
15 | #endif | 15 | #endif |
16 | 16 | ||
17 | /* Used by NOFORK applets (e.g. cat) - must be very careful | 17 | /* Used by NOFORK applets (e.g. cat) - must not use xmalloc */ |
18 | * when calling xfuncs, allocating memory, with signals, termios, etc... */ | ||
19 | 18 | ||
20 | static off_t bb_full_fd_action(int src_fd, int dst_fd, off_t size) | 19 | static off_t bb_full_fd_action(int src_fd, int dst_fd, off_t size) |
21 | { | 20 | { |
22 | int status = -1; | 21 | int status = -1; |
23 | off_t total = 0; | 22 | off_t total = 0; |
24 | RESERVE_CONFIG_BUFFER(buffer, BUFSIZ); | 23 | char buffer[BUFSIZ]; |
25 | 24 | ||
26 | if (src_fd < 0) | 25 | if (src_fd < 0) |
27 | goto out; | 26 | goto out; |
@@ -63,7 +62,6 @@ static off_t bb_full_fd_action(int src_fd, int dst_fd, off_t size) | |||
63 | } | 62 | } |
64 | } | 63 | } |
65 | out: | 64 | out: |
66 | RELEASE_CONFIG_BUFFER(buffer); | ||
67 | return status ? -1 : total; | 65 | return status ? -1 : total; |
68 | } | 66 | } |
69 | 67 | ||