diff --git a/src/requester/pldm.c b/src/requester/pldm.c
index 45179f4..89fd188 100644
--- a/src/requester/pldm.c
+++ b/src/requester/pldm.c
@@ -53,11 +53,10 @@
 /* This macro does the setup and teardown required for the old API to use the
  * new API. Since the setup/teardown logic is the same for all four send/recv
  * functions, it makes sense to only define it once. */
-#define PLDM_REQ_FN(eid, fd, fn, ...)                                            \
+#define PLDM_REQ_FN(eid, fd, fn, rc, ...)                                        \
 	do {                                                                     \
 		struct pldm_transport_mctp_demux *demux;                         \
 		bool using_open_transport = false;                               \
-		pldm_requester_rc_t rc;                                          \
 		pldm_tid_t tid = 1;                                              \
 		struct pldm_transport *ctx;                                      \
 		/* The fd can be for a socket we opened or one the consumer    \
@@ -85,15 +84,32 @@
 		if (!using_open_transport) {                                     \
 			pldm_transport_mctp_demux_destroy(demux);                \
 		}                                                                \
-		return rc;                                                       \
+		break;                                                           \
 	} while (0)
 
 LIBPLDM_ABI_STABLE
 pldm_requester_rc_t pldm_recv_any(mctp_eid_t eid, int mctp_fd,
 				  uint8_t **pldm_resp_msg, size_t *resp_msg_len)
 {
-	PLDM_REQ_FN(eid, mctp_fd, pldm_transport_recv_msg,
+	pldm_requester_rc_t rc = 0;
+	PLDM_REQ_FN(eid, mctp_fd, pldm_transport_recv_msg, rc,
 		    (void **)pldm_resp_msg, resp_msg_len);
+	struct pldm_msg_hdr *hdr = (struct pldm_msg_hdr *)(*pldm_resp_msg);
+	if (rc != PLDM_REQUESTER_SUCCESS) {
+		return rc;
+	}
+	if (hdr && (hdr->request || hdr->datagram)) {
+		free(*pldm_resp_msg);
+		*pldm_resp_msg = NULL;
+		return PLDM_REQUESTER_NOT_RESP_MSG;
+	}
+	uint8_t pldm_cc = 0;
+	if (*resp_msg_len < (sizeof(struct pldm_msg_hdr) + sizeof(pldm_cc))) {
+		free(*pldm_resp_msg);
+		*pldm_resp_msg = NULL;
+		return PLDM_REQUESTER_RESP_MSG_TOO_SMALL;
+	}
+	return rc;
 }
 
 LIBPLDM_ABI_STABLE
@@ -119,16 +135,38 @@
 				   size_t req_msg_len, uint8_t **pldm_resp_msg,
 				   size_t *resp_msg_len)
 {
-	PLDM_REQ_FN(eid, mctp_fd, pldm_transport_send_recv_msg, pldm_req_msg,
-		    req_msg_len, (void **)pldm_resp_msg, resp_msg_len);
+	pldm_requester_rc_t rc = 0;
+	struct pldm_msg_hdr *hdr = (struct pldm_msg_hdr *)pldm_req_msg;
+	if (hdr && !hdr->request) {
+		return PLDM_REQUESTER_NOT_REQ_MSG;
+	}
+	PLDM_REQ_FN(eid, mctp_fd, pldm_transport_send_recv_msg, rc,
+		    pldm_req_msg, req_msg_len, (void **)pldm_resp_msg,
+		    resp_msg_len);
+	if (rc != PLDM_REQUESTER_SUCCESS) {
+		return rc;
+	}
+	hdr = (struct pldm_msg_hdr *)pldm_resp_msg;
+	if (hdr && (hdr->request || hdr->datagram)) {
+		free(*pldm_resp_msg);
+		*pldm_resp_msg = NULL;
+		return PLDM_REQUESTER_NOT_RESP_MSG;
+	}
+	return rc;
 }
 
 LIBPLDM_ABI_STABLE
 pldm_requester_rc_t pldm_send(mctp_eid_t eid, int mctp_fd,
 			      const uint8_t *pldm_req_msg, size_t req_msg_len)
 {
-	PLDM_REQ_FN(eid, mctp_fd, pldm_transport_send_msg, (void *)pldm_req_msg,
-		    req_msg_len);
+	pldm_requester_rc_t rc = 0;
+	struct pldm_msg_hdr *hdr = (struct pldm_msg_hdr *)pldm_req_msg;
+	if (!hdr->request) {
+		return PLDM_REQUESTER_NOT_REQ_MSG;
+	}
+	PLDM_REQ_FN(eid, mctp_fd, pldm_transport_send_msg, rc,
+		    (void *)pldm_req_msg, req_msg_len);
+	return rc;
 }
 
 /* Adding this here for completeness in the case we can't smoothly
diff --git a/src/transport/transport.c b/src/transport/transport.c
index 0cbef29..1219147 100644
--- a/src/transport/transport.c
+++ b/src/transport/transport.c
@@ -66,11 +66,6 @@
 		return PLDM_REQUESTER_NOT_REQ_MSG;
 	}
 
-	const struct pldm_msg_hdr *hdr = pldm_req_msg;
-	if (!hdr->request) {
-		return PLDM_REQUESTER_NOT_REQ_MSG;
-	}
-
 	return transport->send(transport, tid, pldm_req_msg, req_msg_len);
 }
 
@@ -90,20 +85,11 @@
 		return rc;
 	}
 
-	struct pldm_msg_hdr *hdr = *pldm_resp_msg;
-	if (hdr->request || hdr->datagram) {
+	if (*resp_msg_len < sizeof(struct pldm_msg_hdr)) {
 		free(*pldm_resp_msg);
 		*pldm_resp_msg = NULL;
-		return PLDM_REQUESTER_NOT_RESP_MSG;
+		return PLDM_REQUESTER_INVALID_RECV_LEN;
 	}
-
-	uint8_t pldm_rc = 0;
-	if (*resp_msg_len < (sizeof(struct pldm_msg_hdr) + sizeof(pldm_rc))) {
-		free(*pldm_resp_msg);
-		*pldm_resp_msg = NULL;
-		return PLDM_REQUESTER_RESP_MSG_TOO_SMALL;
-	}
-
 	return PLDM_REQUESTER_SUCCESS;
 }
 
