virStreamSourceFunc handler,
void *opaque)
{
- char *bytes = NULL;
+ g_autofree char *bytes = NULL;
size_t want = VIR_NET_MESSAGE_LEGACY_PAYLOAD_MAX;
int ret = -1;
VIR_DEBUG("stream=%p, handler=%p, opaque=%p", stream, handler, opaque);
ret = 0;
cleanup:
- VIR_FREE(bytes);
-
if (ret != 0) {
virErrorPtr orig_err;
virStreamSourceSkipFunc skipHandler,
void *opaque)
{
- char *bytes = NULL;
+ g_autofree char *bytes = NULL;
size_t bufLen = VIR_NET_MESSAGE_LEGACY_PAYLOAD_MAX;
int ret = -1;
unsigned long long dataLen = 0;
ret = 0;
cleanup:
- VIR_FREE(bytes);
-
if (ret != 0) {
virErrorPtr orig_err;
virStreamSinkFunc handler,
void *opaque)
{
- char *bytes = NULL;
+ g_autofree char *bytes = NULL;
size_t want = VIR_NET_MESSAGE_LEGACY_PAYLOAD_MAX;
int ret = -1;
VIR_DEBUG("stream=%p, handler=%p, opaque=%p", stream, handler, opaque);
ret = 0;
cleanup:
- VIR_FREE(bytes);
-
if (ret != 0) {
virErrorPtr orig_err;
virStreamSinkHoleFunc holeHandler,
void *opaque)
{
- char *bytes = NULL;
+ g_autofree char *bytes = NULL;
size_t want = VIR_NET_MESSAGE_LEGACY_PAYLOAD_MAX;
const unsigned int flags = VIR_STREAM_RECV_STOP_AT_HOLE;
int ret = -1;
ret = 0;
cleanup:
- VIR_FREE(bytes);
-
if (ret != 0) {
virErrorPtr orig_err;