projects
/
yaz-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Fix annoying warning about wrbuf_putc YAZ-789
[yaz-moved-to-github.git]
/
src
/
cookie.c
diff --git
a/src/cookie.c
b/src/cookie.c
index
2a22b2f
..
6aa0042
100644
(file)
--- a/
src/cookie.c
+++ b/
src/cookie.c
@@
-34,6
+34,12
@@
yaz_cookies_t yaz_cookies_create(void)
void yaz_cookies_destroy(yaz_cookies_t yc)
{
+ yaz_cookies_reset(yc);
+ xfree(yc);
+}
+
+void yaz_cookies_reset(yaz_cookies_t yc)
+{
if (yc)
{
struct cookie *c = yc->list;
@@
-47,7
+53,7
@@
void yaz_cookies_destroy(yaz_cookies_t yc)
xfree(c);
c = c1;
}
- xfree(yc);
+ yc->list = 0;
}
}