X-Git-Url: http://the.earth.li/gitweb/?p=onak.git;a=blobdiff_plain;f=mem.c;h=6ac80e61a28897ffb1d39160ada4658a5358bf04;hp=2b45158028857d2c57b71f947110d7a621980e21;hb=76f079e5ebdb34acaaa2462a8d915ee06d3c8425;hpb=e0dd4d10f385cd19da389ec66622eea8aa66ae59 diff --git a/mem.c b/mem.c index 2b45158..6ac80e6 100644 --- a/mem.c +++ b/mem.c @@ -13,8 +13,7 @@ * more details. * * You should have received a copy of the GNU General Public License along with - * this program; if not, write to the Free Software Foundation, Inc., 51 - * Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * this program. If not, see . */ #include @@ -24,6 +23,7 @@ #include "keystructs.h" #include "ll.h" #include "mem.h" +#include "stats.h" /** * packet_dup - duplicate an OpenPGP packet. @@ -172,26 +172,3 @@ void free_publickey(struct openpgp_publickey *key) { key = nextkey; } } - -/** - * free_statskey - free an stats key structure. - * @key: The key to free. - * - * Takes a stats key and frees the memory used by it and the linked list - * of sigs under it. Doesn't recurse into the list as it's assumed all the - * objects referenced also exist in the hash. - */ -void free_statskey(struct stats_key *key) -{ - if (key != NULL) { - if (key->sigs != NULL) { - llfree(key->sigs, NULL); - key->sigs = NULL; - } - if (key->signs != NULL) { - llfree(key->signs, NULL); - key->signs = NULL; - } - free(key); - } -}