fix memory leak

we must not assign the pointer a NULL since it keeps allocated
data and at least parts of an error string
This commit is contained in:
Daniel Stenberg 2010-03-23 23:16:08 +01:00
parent 05f9fb878e
commit 5512d0d593

View File

@ -1005,12 +1005,10 @@ scp_send(LIBSSH2_SESSION * session, const char *path, int mode,
*/
LIBSSH2_FREE(session, session->scpSend_err_msg);
session->scpSend_err_msg = NULL;
goto scp_send_error;
}
libssh2_error(session, LIBSSH2_ERROR_SCP_PROTOCOL,
"failed waiting for ACK");
session->scpSend_err_msg = NULL;
else
libssh2_error(session, LIBSSH2_ERROR_SCP_PROTOCOL,
"failed waiting for ACK");
goto scp_send_error;
}
}