This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/cgit.cgi/v4l-utils.git tree:
Subject: ir-ctl: fix memory leaks and incorrect messages Author: Sean Young <s...@mess.org> Date: Mon Sep 9 12:43:55 2019 +0100 Signed-off-by: Sean Young <s...@mess.org> utils/common/keymap.c | 7 +++++-- utils/ir-ctl/ir-ctl.c | 4 ++-- 2 files changed, 7 insertions(+), 4 deletions(-) --- http://git.linuxtv.org/cgit.cgi/v4l-utils.git/commit/?id=78953a1166aba23e9a7c40e597a741c7d71a847c diff --git a/utils/common/keymap.c b/utils/common/keymap.c index 1252646186e2..f574f24fd6e4 100644 --- a/utils/common/keymap.c +++ b/utils/common/keymap.c @@ -323,11 +323,13 @@ static error_t parse_toml_protocol(const char *fname, struct toml_table_t *proot raw = toml_raw_in(proot, "protocol"); if (!raw) { fprintf(stderr, _("%s: protocol missing\n"), fname); + free_keymap(map); return EINVAL; } if (toml_rtos(raw, &p)) { fprintf(stderr, _("%s: bad value `%s' for protocol\n"), fname, raw); + free_keymap(map); return EINVAL; } @@ -419,6 +421,7 @@ static error_t parse_toml_protocol(const char *fname, struct toml_table_t *proot raw = toml_raw_in(scancodes, scancode); if (!raw) { fprintf(stderr, _("%s: invalid value `%s'\n"), fname, scancode); + free_keymap(map); return EINVAL; } @@ -466,14 +469,14 @@ static error_t parse_toml_keymap(char *fname, struct keymap **keymap, bool verbo root = toml_parse_file(fin, buf, sizeof(buf)); fclose(fin); if (!root) { - fprintf(stderr, _("%s: failed to parse toml: %s\n"), fname, buf); + fprintf(stderr, _("%s: error: %s\n"), fname, buf); return EINVAL; } arr = toml_array_in(root, "protocols"); if (!arr) { fprintf(stderr, _("%s: missing [protocols] section\n"), fname); - return EINVAL; + goto out; } struct keymap *map = NULL; diff --git a/utils/ir-ctl/ir-ctl.c b/utils/ir-ctl/ir-ctl.c index 586461ace086..8aead6e08df8 100644 --- a/utils/ir-ctl/ir-ctl.c +++ b/utils/ir-ctl/ir-ctl.c @@ -60,7 +60,7 @@ #define LIRCBUF_SIZE 1024 #define IR_DEFAULT_TIMEOUT 125000 -const char *argp_program_version = "IR raw version " V4L_UTILS_VERSION; +const char *argp_program_version = "IR ctl version " V4L_UTILS_VERSION; const char *argp_program_bug_address = "Sean Young <s...@mess.org>"; /* @@ -251,7 +251,7 @@ static struct send *read_file_pulse_space(struct arguments *args, const char *fn scancodestr = strchr(p, ':'); if (!scancodestr) { - fprintf(stderr, _("error: %s:%d: scancode argument '%s' should in protocol:scancode format\n"), fname, lineno, p); + fprintf(stderr, _("error: %s:%d: scancode argument '%s' should be in protocol:scancode format\n"), fname, lineno, p); fclose(input); free(f); return NULL; _______________________________________________ linuxtv-commits mailing list linuxtv-commits@linuxtv.org https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits