From f762125c8296407c918e75c90f30166d7e546b11 Mon Sep 17 00:00:00 2001 From: Linus Nordberg Date: Tue, 1 Mar 2011 00:41:34 +0100 Subject: rs_request_send: Check arguments and that we have a packet to send. --- lib/request.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib') diff --git a/lib/request.c b/lib/request.c index b03d434..9aa29cb 100644 --- a/lib/request.c +++ b/lib/request.c @@ -102,6 +102,9 @@ rs_request_send (struct rs_request *request, struct rs_packet **resp_msg) assert (request->req_msg); conn = request->conn; + if (!request || !request->conn || !request->req_msg || !resp_msg) + return rs_err_conn_push_fl (conn, RSE_INVAL, __FILE__, __LINE__, NULL); + request->saved_cb = conn->callbacks; conn->callbacks.connected_cb = _rs_req_connected; -- cgit v1.1