The query_tty_stats() will exit only when it is signaled to stop. Signed-off-by: Sami Kerola <kerolasa@xxxxxx> --- sys-utils/cytune.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sys-utils/cytune.c b/sys-utils/cytune.c index dde793e..c93951d 100644 --- a/sys-utils/cytune.c +++ b/sys-utils/cytune.c @@ -120,7 +120,8 @@ static inline double dtime(struct timeval *tvpnew, struct timeval *tvpold) return diff; } -static void signal_handler(int sig __attribute__((__unused__))) +static void __attribute__((__noreturn__)) +signal_handler(int sig __attribute__((__unused__))) { struct cyclades_control *cc; int argc, local_optind; @@ -135,6 +136,7 @@ static void signal_handler(int sig __attribute__((__unused__))) "and the maximum transfer rate in characters/second was %f"), cc->filename, cc->threshold_value, cc->maxmax, cc->maxtran); } + free(cmon); exit(EXIT_SUCCESS); } @@ -161,7 +163,8 @@ static void cyg_get_mon(int fd, struct cyclades_monitor *mon, char *file, err(EXIT_FAILURE, _("cannot get timeout for %s"), file); } -static void query_tty_stats(int argc, char **argv, struct cytune_modifiers *mod) +static void __attribute__((__noreturn__)) +query_tty_stats(int argc, char **argv, struct cytune_modifiers *mod) { struct cyclades_monitor cywork; struct cyclades_control *cc; @@ -233,9 +236,6 @@ static void query_tty_stats(int argc, char **argv, struct cytune_modifiers *mod) memcpy(&cc->c, &cywork, sizeof(struct cyclades_monitor)); } } - - free(cmon); - return; } int main(int argc, char **argv) -- 1.9.2 -- To unsubscribe from this list: send the line "unsubscribe util-linux" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html