projects
/
pazpar2-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
bbb76ac
)
Fix leak for show raw
author
Adam Dickmeiss
<adam@indexdata.dk>
Thu, 24 Sep 2009 11:08:02 +0000
(13:08 +0200)
committer
Adam Dickmeiss
<adam@indexdata.dk>
Thu, 24 Sep 2009 11:08:02 +0000
(13:08 +0200)
src/client.c
patch
|
blob
|
history
diff --git
a/src/client.c
b/src/client.c
index
8c12a9e
..
95e130a
100644
(file)
--- a/
src/client.c
+++ b/
src/client.c
@@
-254,6
+254,13
@@
int client_show_raw_begin(struct client *cl, int position,
return 0;
}
return 0;
}
+static void client_show_raw_delete(struct show_raw *r)
+{
+ xfree(r->syntax);
+ xfree(r->esn);
+ xfree(r);
+}
+
void client_show_raw_remove(struct client *cl, void *data)
{
struct show_raw *rr = data;
void client_show_raw_remove(struct client *cl, void *data)
{
struct show_raw *rr = data;
@@
-263,7
+270,7
@@
void client_show_raw_remove(struct client *cl, void *data)
if (*rrp)
{
*rrp = rr->next;
if (*rrp)
{
*rrp = rr->next;
- xfree(rr);
+ client_show_raw_delete(rr);
}
}
}
}
@@
-272,7
+279,7
@@
void client_show_raw_dequeue(struct client *cl)
struct show_raw *rr = cl->show_raw;
cl->show_raw = rr->next;
struct show_raw *rr = cl->show_raw;
cl->show_raw = rr->next;
- xfree(rr);
+ client_show_raw_delete(rr);
}
static void client_show_raw_error(struct client *cl, const char *addinfo)
}
static void client_show_raw_error(struct client *cl, const char *addinfo)