Lines Matching refs:afalg
73 QCryptoAFAlg *afalg; in qcrypto_afalg_comm_alloc() local
75 afalg = g_new0(QCryptoAFAlg, 1); in qcrypto_afalg_comm_alloc()
77 afalg->opfd = -1; in qcrypto_afalg_comm_alloc()
78 afalg->tfmfd = qcrypto_afalg_socket_bind(type, name, errp); in qcrypto_afalg_comm_alloc()
79 if (afalg->tfmfd == -1) { in qcrypto_afalg_comm_alloc()
83 afalg->opfd = qemu_accept(afalg->tfmfd, NULL, 0); in qcrypto_afalg_comm_alloc()
84 if (afalg->opfd == -1) { in qcrypto_afalg_comm_alloc()
89 return afalg; in qcrypto_afalg_comm_alloc()
92 qcrypto_afalg_comm_free(afalg); in qcrypto_afalg_comm_alloc()
96 void qcrypto_afalg_comm_free(QCryptoAFAlg *afalg) in qcrypto_afalg_comm_free() argument
98 if (!afalg) { in qcrypto_afalg_comm_free()
102 if (afalg->msg) { in qcrypto_afalg_comm_free()
103 g_free(afalg->msg->msg_control); in qcrypto_afalg_comm_free()
104 g_free(afalg->msg); in qcrypto_afalg_comm_free()
107 if (afalg->tfmfd != -1) { in qcrypto_afalg_comm_free()
108 close(afalg->tfmfd); in qcrypto_afalg_comm_free()
111 if (afalg->opfd != -1) { in qcrypto_afalg_comm_free()
112 close(afalg->opfd); in qcrypto_afalg_comm_free()
115 g_free(afalg); in qcrypto_afalg_comm_free()