]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
secret: drop dead code
authorEric Blake <eblake@redhat.com>
Mon, 6 Jun 2011 19:14:48 +0000 (13:14 -0600)
committerEric Blake <eblake@redhat.com>
Wed, 8 Jun 2011 11:28:20 +0000 (05:28 -0600)
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.

src/secret/secret_driver.c

index 8f5e7357c3f095b7c8f76fd4fe4de5da1295dfcf..ee3c165e2224bdb8d6e6bc3e113f02d7745b3002 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * 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;