From 2571cf0f9bfa769bdf9c8fba25684fa0330a2b57 Mon Sep 17 00:00:00 2001 From: Tobias Stoeckmann Date: Mon, 3 Oct 2016 22:05:46 +0200 Subject: 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. --- text-utils/rev.c | 1 - 1 file changed, 1 deletion(-) (limited to 'text-utils/rev.c') 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); } -- cgit v1.2.3-55-g7522