diff --git a/obexd/gwobex/obex-priv.c b/obexd/gwobex/obex-priv.c
index a08599f..7352cdc 100644
--- a/obexd/gwobex/obex-priv.c
+++ b/obexd/gwobex/obex-priv.c
}
if (ctx->xfer) {
/* Check that buffer is owned by us */
- if (!(ctx->obex_op == OBEX_CMD_PUT && ctx->xfer->stream_fd < 0))
+ if (!(ctx->obex_op == OBEX_CMD_PUT && ctx->xfer->stream_fd < 0)) {
g_free(ctx->xfer->buf);
- ctx->xfer->buf = NULL;
- ctx->xfer->buf_size = 0;
+ ctx->xfer->buf = NULL;
+ ctx->xfer->buf_size = 0;
+ }
ctx->xfer->do_cb = TRUE;
}
}