From: Hans Verkuil <hverkuil+cisco@kernel.org>
To: Sai Vishnu M <saivishnu725@gmail.com>, linux-media@vger.kernel.org
Subject: Re: [PATCH v4l-utils] Add missing allocation failure check
Date: Wed, 9 Sep 2026 16:31:59 +0200 [thread overview]
Message-ID: <7c414e45-315a-4ed5-ac08-373f137a8c0f@kernel.org> (raw)
In-Reply-To: <20260717165445.46734-1-saivishnu725@gmail.com>
No commit message, improper indentation, and not really worth the effort for
a simple userspace utility.
Sorry, I'm rejecting this patch.
Regards,
Hans
On 17/07/2026 18:54, Sai Vishnu M wrote:
> Signed-off-by: Sai Vishnu <saivishnu725@gmail.com>
> ---
> utils/common/keymap.c | 11 ++++++++++-
> 1 file change
> d, 10 insertions(+), 1 deletion(-)
>
> diff --git a/utils/common/keymap.c b/utils/common/keymap.c
> index 21c1c0b5..b881187a 100644
> --- a/utils/common/keymap.c
> +++ b/utils/common/keymap.c
> @@ -124,7 +124,11 @@ static error_t parse_plain_keymap(char *fname, struct keymap **keymap, bool verb
> struct keymap *k;
>
> k = calloc(1, sizeof(*k));
> - k->protocol = strdup(p);
> + if (!k) {
> + perror("parse_keymap");
> + return ENOMEM;
> + }
> + k->protocol = strdup(p);
> k->next = map->next;
> map->next = k;
> }
> @@ -399,6 +403,11 @@ static error_t parse_toml_protocol(const char *fname, struct toml_table_t *proot
> struct protocol_param *param;
>
> param = malloc(sizeof(*param));
> + if (!param) {
> + perror("parse_toml_protocol");
> + free_keymap(map);
> + return ENOMEM;
> + }
> param->name = strdup(key);
> param->value = value;
> param->next = map->param;
prev parent reply other threads:[~2026-09-09 14:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-17 16:54 [PATCH v4l-utils] Add missing allocation failure check Sai Vishnu M
2026-09-09 14:31 ` Hans Verkuil [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7c414e45-315a-4ed5-ac08-373f137a8c0f@kernel.org \
--to=hverkuil+cisco@kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=saivishnu725@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox