X-Git-Url: http://the.earth.li/gitweb/?a=blobdiff_plain;f=mem.h;h=be24e2084e95faf763e288c8d47770d5d0c6d703;hb=4127b47cd6603d328e540f4f69f66fad9b303fa7;hp=3358cd18c7ea77c5e366722452b7396d63c5ce19;hpb=4b8483ae278577a3adc8d84da81d77019704466f;p=onak.git diff --git a/mem.h b/mem.h index 3358cd1..be24e20 100644 --- a/mem.h +++ b/mem.h @@ -1,15 +1,27 @@ /* * mem.h - Routines to cleanup memory after use. * - * Jonathan McDowell + * Copyright 2002-2004,2007 Jonathan McDowell * - * Copyright 2002 Project Purple + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the Free + * Software Foundation; version 2 of the License. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * 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. */ #ifndef __MEM_H_ #define __MEM_H_ #include "keystructs.h" +#include "stats.h" /** * packet_dup - duplicate an OpenPGP packet. @@ -73,4 +85,14 @@ void free_signedpacket_list( */ void free_publickey(struct openpgp_publickey *key); +/** + * 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); + #endif /* __MEM_H_ */