diff --git a/src/libeis-client.c b/src/libeis-client.c index 5e2e190..0902706 100644 --- a/src/libeis-client.c +++ b/src/libeis-client.c @@ -397,6 +397,7 @@ client_dispatch(struct source *source, void *data) { struct eis_client *client = data; enum eis_client_state old_state = client->state; + _cleanup_(message_freep) struct message *msg = NULL; _cleanup_iobuf_ struct iobuf *buf = iobuf_new(64); int rc = iobuf_append_from_fd(buf, source_get_fd(source)); @@ -405,8 +406,7 @@ client_dispatch(struct source *source, void *data) else if (rc < 0) goto error; - _cleanup_(message_freep) struct message *msg = - client_parse_message(iobuf_data(buf), iobuf_len(buf)); + msg = client_parse_message(iobuf_data(buf), iobuf_len(buf)); if (!msg) { rc = -EBADMSG; goto error;