diff --git a/examples/libssh_scp.c b/examples/libssh_scp.c index fc2ceeb7..2c46a036 100644 --- a/examples/libssh_scp.c +++ b/examples/libssh_scp.c @@ -119,6 +119,10 @@ static struct location *parse_location(char *loc) struct location *location = NULL; char *ptr = NULL; + if (loc == NULL) { + return NULL; + } + location = malloc(sizeof(struct location)); if (location == NULL) { return NULL;