mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-11-29 01:03:57 +03:00
tests: Check for NULL in torture_client_config
CID 1396566 Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
@@ -65,8 +65,12 @@ static int teardown(void **state)
|
|||||||
char *filename;
|
char *filename;
|
||||||
|
|
||||||
filename = ssh_path_expand_tilde("~/.ssh/config");
|
filename = ssh_path_expand_tilde("~/.ssh/config");
|
||||||
unlink(filename);
|
if (filename != NULL) {
|
||||||
free(filename);
|
if (strlen(filename) > 0) {
|
||||||
|
unlink(filename);
|
||||||
|
}
|
||||||
|
SAFE_FREE(filename);
|
||||||
|
}
|
||||||
|
|
||||||
unlink(LIBSSH_SSH_CONFIG);
|
unlink(LIBSSH_SSH_CONFIG);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user