HomePhabricator

messages: Fix NULL check, preventing SEGFAULT

Authored by Anderson Toshiyuki Sasaki <ansasaki@redhat.com> on Jan 14 2019, 6:27 PM.

Description

messages: Fix NULL check, preventing SEGFAULT

The wrong conditional check for newly allocated memory would make the
function to fail when the allocation was successful and access invalid
memory when the allocation failed.

Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>

Details

Committed
asnJan 26 2019, 1:56 PM
Parents
rLIBSSH6dacc8b26c14: gitlab-ci: Add (disabled) target with MemorySanitizer
Branches
Unknown
Tags
Unknown