chiark / gitweb /
Always check asprintf return code
authorKarel Zak <kzak@redhat.com>
Fri, 25 Jul 2014 13:38:31 +0000 (15:38 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sat, 26 Jul 2014 19:08:41 +0000 (15:08 -0400)
commit7de80bfe2e61d5818601ccfddbadad3b7703ed70
treeb8b90c03198f2f2125d13e175b2223e6239894f0
parent6d314eca15f6cbda38d82774b210f784d3d4f52a
Always check asprintf return code

There is a small number of the places in sources where we don't check
asprintf() return code and assume that after error the function
returns NULL pointer via the first argument. That's wrong, after
error the content of pointer is undefined.
src/core/unit-printf.c
src/cryptsetup/cryptsetup.c
src/journal/coredump.c
src/journal/journalctl.c
src/run/run.c
src/shared/install.c
src/systemctl/systemctl.c
src/tty-ask-password-agent/tty-ask-password-agent.c