Skip to content

Commit

Permalink
bugfix: avoid use of uninitialized value
Browse files Browse the repository at this point in the history
  • Loading branch information
bagder committed Nov 1, 2010
1 parent a0dd0c5 commit 024b5d2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions example/ssh2_exec.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ int main(int argc, char *argv[])
LIBSSH2_CHANNEL *channel;
int rc;
int exitcode;
char *exitsignal;
char *exitsignal=(char *)"none";
int bytecount = 0;
size_t len;
LIBSSH2_KNOWNHOSTS *nh;
Expand Down Expand Up @@ -287,7 +287,8 @@ int main(int argc, char *argv[])
if( rc == 0 )
{
exitcode = libssh2_channel_get_exit_status( channel );
libssh2_channel_get_exit_signal(channel, &exitsignal, NULL, NULL, NULL, NULL, NULL);
libssh2_channel_get_exit_signal(channel, &exitsignal,
NULL, NULL, NULL, NULL, NULL);
}

if (exitsignal)
Expand Down

0 comments on commit 024b5d2

Please sign in to comment.