diff options
author | Tobias Stoeckmann | 2016-10-03 22:05:46 +0200 |
---|---|---|
committer | Karel Zak | 2016-10-06 14:56:39 +0200 |
commit | 2571cf0f9bfa769bdf9c8fba25684fa0330a2b57 (patch) | |
tree | a8130ee6bf26ed5218a0b9db185717d69bc9aa51 /text-utils/rev.c | |
parent | libblkid: Avoid strlen if only first char is checked (diff) | |
download | kernel-qcow2-util-linux-2571cf0f9bfa769bdf9c8fba25684fa0330a2b57.tar.gz kernel-qcow2-util-linux-2571cf0f9bfa769bdf9c8fba25684fa0330a2b57.tar.xz kernel-qcow2-util-linux-2571cf0f9bfa769bdf9c8fba25684fa0330a2b57.zip |
rev: Avoid calling free in a signal handler
free() is not a safe function for a signal handler. The next
line calls _exit() anyway, so there is no need for resource
management.
Diffstat (limited to 'text-utils/rev.c')
-rw-r--r-- | text-utils/rev.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/text-utils/rev.c b/text-utils/rev.c index cb3848241..ace2cd6a6 100644 --- a/text-utils/rev.c +++ b/text-utils/rev.c @@ -68,7 +68,6 @@ wchar_t *buf; static void sig_handler(int signo __attribute__ ((__unused__))) { - free(buf); _exit(EXIT_SUCCESS); } |