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.
/*
* 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
*
* This library is free software; you can redistribute it and/or
if (virCommandRun(cmd, NULL) < 0)
goto cleanup;
virCommandFree(cmd);
+ cmd = NULL;
/* now remove the pv devices and clear them out */
ret = 0;