From 0b077eab511a29b82422ca1850f4c84a173bf5a5 Mon Sep 17 00:00:00 2001 From: Sami Kerola Date: Tue, 7 Feb 2012 23:03:55 +0100 Subject: [PATCH] tunelp: free allocation, use xalloc Signed-off-by: Sami Kerola Signed-off-by: Karel Zak --- sys-utils/tunelp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys-utils/tunelp.c b/sys-utils/tunelp.c index f59c6dd485..700fe6558e 100644 --- a/sys-utils/tunelp.c +++ b/sys-utils/tunelp.c @@ -254,7 +254,7 @@ int main(int argc, char **argv) if (optind != argc - 1) print_usage(stderr); - filename = strdup(argv[optind]); + filename = xstrdup(argv[optind]); fd = open(filename, O_WRONLY | O_NONBLOCK, 0); /* Need to open O_NONBLOCK in case ABORTOPEN is already set * and printer is off or off-line or in an error condition. @@ -326,7 +326,7 @@ int main(int argc, char **argv) else printf(_("%s using polling\n"), filename); } - + free(filename); close(fd); return EXIT_SUCCESS; -- 2.47.2