提交 ba4983da 编写于 作者: E Eric Blake

secret: drop dead code

Detected by Coverity.  The only ways to get to the cleanup label
were by an early abort (list still unassigned) or after successfully
transferring list to dest, so there is no list to clean up.

* src/secret/secret_driver.c (loadSecrets): Kill dead code.
上级 4eb17d64
/*
* secret_driver.c: local driver for secret manipulation API
*
* Copyright (C) 2009-2010 Red Hat, Inc.
* Copyright (C) 2009-2011 Red Hat, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
......@@ -516,12 +516,6 @@ loadSecrets(virSecretDriverStatePtr driver,
ret = 0;
cleanup:
while (list != NULL) {
virSecretEntryPtr s;
s = listUnlink(&list);
secretFree(s);
}
if (dir != NULL)
closedir(dir);
return ret;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册