crm_recv_remote_raw(void *session, gboolean encrypted, size_t max_recv, size_t *recv_len, int *disconnected)
{
    char *reply = NULL;
    if (recv_len) {
        *recv_len = 0;
    }

    if (disconnected) {
        *disconnected = 0;
    }

    if (encrypted) {
#ifdef HAVE_GNUTLS_GNUTLS_H
        reply = crm_recv_tls(session, max_recv, recv_len, disconnected);
#else
        CRM_ASSERT(encrypted == FALSE);
#endif
    } else {
        reply = crm_recv_plaintext(GPOINTER_TO_INT(session), max_recv, recv_len, disconnected);
    }
    if (reply == NULL || strlen(reply) == 0) {
        crm_trace("Empty reply");
    }

    return reply;
}
Weaknesses in this category are related to improper management of system resources.