[systemd-devel] [PATCH] coredumpctl: check return of strndup
Lennart Poettering
lennart at poettering.net
Wed Dec 19 06:29:03 PST 2012
On Wed, 19.12.12 14:38, Lukas Nykryn (lnykryn at redhat.com) wrote:
Applied! Thanks!
> ---
> src/journal/coredumpctl.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/journal/coredumpctl.c b/src/journal/coredumpctl.c
> index f9cebb7..4f0ed58 100644
> --- a/src/journal/coredumpctl.c
> +++ b/src/journal/coredumpctl.c
> @@ -262,7 +262,7 @@ static int retrieve(const void *data,
> return 0;
>
> *var = strndup((const char*)data + ident, len - ident);
> - if (!var)
> + if (!*var)
> return log_oom();
>
> return 0;
Lennart
--
Lennart Poettering - Red Hat, Inc.
More information about the systemd-devel
mailing list