HomePhabricator

tests: Fix a clang possible memory leak warning

Authored by Anderson Toshiyuki Sasaki <ansasaki@redhat.com> on Thu, Nov 29, 1:22 PM.

Description

tests: Fix a clang possible memory leak warning

clang was reporting a possible memory leak after mkdtemp() call, which
was a false positive, since mkdtemp() returns the same pointer provided
as the parameter, in case of success. This changes the code so that the
static analyser don't get confused.

Found by csbuild runner.

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

Details

Committed
asnFri, Nov 30, 6:28 PM
Parents
rLIBSSHc41383476470: tests: Test calling ssh_init() after ssh_finalize()
Branches
Unknown
Tags
Unknown