From: Sami Kerola Date: Tue, 7 Feb 2012 22:03:55 +0000 (+0100) Subject: tunelp: free allocation, use xalloc X-Git-Tag: v2.21~34 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0b077eab511a29b82422ca1850f4c84a173bf5a5;p=thirdparty%2Futil-linux.git tunelp: free allocation, use xalloc Signed-off-by: Sami Kerola Signed-off-by: Karel Zak --- 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;