mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
storage: Avoid double virCommandFree in virStorageBackendLogicalDeletePool
When logical pool has no PVs associated with itself (user-created), virCommandFree(cmd) is called twice with the same pointer and that causes a segfault in daemon.
This commit is contained in:
parent
248371417b
commit
2d73f2120f
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* storage_backend_logical.c: storage backend for logical volume handling
|
* storage_backend_logical.c: storage backend for logical volume handling
|
||||||
*
|
*
|
||||||
* Copyright (C) 2007-2009, 2011 Red Hat, Inc.
|
* Copyright (C) 2007-2009, 2011, 2013 Red Hat, Inc.
|
||||||
* Copyright (C) 2007-2008 Daniel P. Berrange
|
* Copyright (C) 2007-2008 Daniel P. Berrange
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or
|
* This library is free software; you can redistribute it and/or
|
||||||
@ -667,6 +667,7 @@ virStorageBackendLogicalDeletePool(virConnectPtr conn ATTRIBUTE_UNUSED,
|
|||||||
if (virCommandRun(cmd, NULL) < 0)
|
if (virCommandRun(cmd, NULL) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
virCommandFree(cmd);
|
virCommandFree(cmd);
|
||||||
|
cmd = NULL;
|
||||||
|
|
||||||
/* now remove the pv devices and clear them out */
|
/* now remove the pv devices and clear them out */
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user