[xiph-cvs] cvs commit: libshout/src util.c
Brendan
brendan at xiph.org
Wed Feb 26 12:14:06 PST 2003
brendan 03/02/26 15:14:06
Modified: src util.c
Log:
Naughty little buglet in util_dict_free. Thanks oddsock.
Revision Changes Path
1.10 +7 -4 libshout/src/util.c
Index: util.c
===================================================================
RCS file: /usr/local/cvsroot/libshout/src/util.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- util.c 25 Feb 2003 23:11:12 -0000 1.9
+++ util.c 26 Feb 2003 20:14:06 -0000 1.10
@@ -134,16 +134,19 @@
void util_dict_free(util_dict *dict)
{
- util_dict *cur;
+ util_dict *next;
+
+ while (dict) {
+ next = dict->next;
- do {
- cur = dict->next;
if (dict->key)
free (dict->key);
if (dict->val)
free (dict->val);
free (dict);
- } while (cur);
+
+ dict = next;
+ }
}
const char *util_dict_get(util_dict *dict, const char *key)
<p><p>--- >8 ----
List archives: http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body. No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.
More information about the commits
mailing list