readprofile: do not close/free just before exiting
function old new delta readprofile_main 1784 1762 -22 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
277081e0a4
commit
035e71578e
@ -48,7 +48,7 @@ ash - interactive, longterm
|
|||||||
awk - noexec. runner
|
awk - noexec. runner
|
||||||
base64 - runner
|
base64 - runner
|
||||||
basename - NOFORK
|
basename - NOFORK
|
||||||
beep
|
beep - longterm: beep -r 999999999
|
||||||
blkdiscard - noexec. leaks: open+xioctl
|
blkdiscard - noexec. leaks: open+xioctl
|
||||||
blkid - noexec
|
blkid - noexec
|
||||||
blockdev - noexec. leaks fd
|
blockdev - noexec. leaks fd
|
||||||
@ -127,7 +127,7 @@ findfs - suid
|
|||||||
flash_eraseall
|
flash_eraseall
|
||||||
flash_lock
|
flash_lock
|
||||||
flash_unlock
|
flash_unlock
|
||||||
flashcp
|
flashcp - needs ^C. flash writing may be slow, better to free memory memory by execing
|
||||||
flock - spawner, changes state (file locks), let's play safe and not be noexec
|
flock - spawner, changes state (file locks), let's play safe and not be noexec
|
||||||
fold - noexec. runner
|
fold - noexec. runner
|
||||||
free - nofork candidate(struct globals, needs to close /proc/meminfo fd)
|
free - nofork candidate(struct globals, needs to close /proc/meminfo fd)
|
||||||
@ -278,7 +278,7 @@ raidautorun - noexec. very simple. leaks: open+xioctl
|
|||||||
rdate - needs ^C (may talk to DNS servers, which may be down)
|
rdate - needs ^C (may talk to DNS servers, which may be down)
|
||||||
rdev - leaks: find_block_device -> readdir+xstrdup
|
rdev - leaks: find_block_device -> readdir+xstrdup
|
||||||
readlink - NOFORK
|
readlink - NOFORK
|
||||||
readprofile
|
readprofile - reads /boot/System.map and /proc/profile, better to free more memory memory by execing?
|
||||||
realpath - NOFORK
|
realpath - NOFORK
|
||||||
reboot - rare
|
reboot - rare
|
||||||
reformime - runner
|
reformime - runner
|
||||||
|
@ -266,8 +266,10 @@ int readprofile_main(int argc UNUSED_PARAM, char **argv)
|
|||||||
printf("%6u %-40s %8.4f\n",
|
printf("%6u %-40s %8.4f\n",
|
||||||
total, "total", total/(double)(fn_add-add0));
|
total, "total", total/(double)(fn_add-add0));
|
||||||
|
|
||||||
fclose(map);
|
if (ENABLE_FEATURE_CLEAN_UP) {
|
||||||
free(buf);
|
fclose(map);
|
||||||
|
free(buf);
|
||||||
|
}
|
||||||
|
|
||||||
return EXIT_SUCCESS;
|
return EXIT_SUCCESS;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user