On 26. 3. 2020 14:14, Seeteena Thoufeek wrote: > This is the only instance of g_autofree change applicable for > qemu_agent.c > > Signed-off-by: Seeteena Thoufeek <s1seetee@xxxxxxxxxxxxxxxxxx> > --- > src/qemu/qemu_agent.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/src/qemu/qemu_agent.c b/src/qemu/qemu_agent.c > index 95a7d9b..c74bd0e 100644 > --- a/src/qemu/qemu_agent.c > +++ b/src/qemu/qemu_agent.c > @@ -1083,7 +1083,7 @@ qemuAgentCommandFull(qemuAgentPtr agent, > { > int ret = -1; > qemuAgentMessage msg; > - char *cmdstr = NULL; > + g_autofree char *cmdstr = NULL; > int await_event = agent->await_event; > > *reply = NULL; > @@ -1133,7 +1133,6 @@ qemuAgentCommandFull(qemuAgentPtr agent, > ret = qemuAgentCheckError(cmd, *reply, report_unsupported); > > cleanup: > - VIR_FREE(cmdstr); > VIR_FREE(msg.txBuffer); > agent->await_event = QEMU_AGENT_EVENT_NONE; > > Hey, there are some more places that could use the same treatment. Namely str1 in qemuAgentIOProcessData() and str1 and str2 in qemuAgentIOProcess(). Do you mind sending a v2 which fixes them too? Michal