mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 13:45:38 +00:00
cmdSnapshotList: Fix memory leak
Fixes: 3caa28dc50
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Laine Stump <laine@redhat.com>
This commit is contained in:
parent
8b8c91f487
commit
89ce1ef86b
@ -1497,7 +1497,6 @@ cmdSnapshotList(vshControl *ctl, const vshCmd *cmd)
|
||||
char *state = NULL;
|
||||
long long creation_longlong;
|
||||
g_autoptr(GDateTime) then = NULL;
|
||||
g_autofree gchar *thenstr = NULL;
|
||||
bool tree = vshCommandOptBool(cmd, "tree");
|
||||
bool name = vshCommandOptBool(cmd, "name");
|
||||
bool from = vshCommandOptBool(cmd, "from");
|
||||
@ -1592,6 +1591,7 @@ cmdSnapshotList(vshControl *ctl, const vshCmd *cmd)
|
||||
}
|
||||
|
||||
for (i = 0; i < snaplist->nsnaps; i++) {
|
||||
g_autofree gchar *thenstr = NULL;
|
||||
const char *snap_name;
|
||||
|
||||
/* free up memory from previous iterations of the loop */
|
||||
|
Loading…
Reference in New Issue
Block a user