aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBertrand Jacquin (Beber) <beber@setibzh.com>2006-01-23 21:46:17 +0100
committerBertrand Jacquin (Beber) <beber@setibzh.com>2006-01-23 21:46:17 +0100
commit74d652b3eca9df2e8ae647e61ba6cdc9f8fffbc0 (patch)
tree8558e6c2b4a4f06818b9af154ddddb2c4cdbf383
parentQuit when ^C and not when connection closed (diff)
downloadespik-74d652b3eca9df2e8ae647e61ba6cdc9f8fffbc0.tar.xz
Avoid memleak
Thanks caro : <caro> Beber`: dans espik_debug.c, ligne 54, rajoute ca : <caro> memset (&sa, 0, sizeof (struct sigaction)); <caro> Beber`: ca va te virer pas mal de essages dans valgrind
-rw-r--r--src/espik_debug.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/espik_debug.c b/src/espik_debug.c
index dfb7cdd..04b32a1 100644
--- a/src/espik_debug.c
+++ b/src/espik_debug.c
@@ -55,6 +55,7 @@ void espik_debug_init()
struct sigaction sa;
sa.sa_handler = espik_debug_bt;
+ memset (&sa, 0, sizeof (struct sigaction));
sigaction(SIGSEGV, &sa, (struct sigaction *)0);
sigaction(SIGINT, &sa, (struct sigaction *)0);
sigaction(SIGKILL, &sa, (struct sigaction *)0);