rev: Avoid calling free in a signal handler
PATCH 1/1 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(-)
text-utils/rev.c +0 -1
@@ -68,7 +68,6 @@ wchar_t *buf;static void sig_handler (int signo __attribute__ ((__unused__))) { -free (buf);_exit (EXIT_SUCCESS ); }
Signature · 1 line
2.10.0
Quoted 6 lines · Tobias Stoeckmann
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(-)
Applied, thanks.
Signature · 2 lines
Karel Zak <[email protected]> http://karelzak.blogspot.com