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:
parent
05f9fb878e
commit
5512d0d593
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user