~mdw
/
disorder
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
More memory hygeine.
[disorder]
/
lib
/
client.c
diff --git
a/lib/client.c
b/lib/client.c
index
d9023a9
..
d7a3564
100644
(file)
--- a/
lib/client.c
+++ b/
lib/client.c
@@
-653,6
+653,7
@@
static int disorder_somequeue(disorder_client *c,
if(!strcmp(l, ".")) {
*qt = 0;
*qp = qh;
if(!strcmp(l, ".")) {
*qt = 0;
*qp = qh;
+ xfree(l);
return 0;
}
q = xmalloc(sizeof *q);
return 0;
}
q = xmalloc(sizeof *q);
@@
-660,6
+661,7
@@
static int disorder_somequeue(disorder_client *c,
*qt = q;
qt = &q->next;
}
*qt = q;
qt = &q->next;
}
+ xfree(l);
}
if(ferror(c->fpin)) {
byte_xasprintf((char **)&c->last, "input error: %s", strerror(errno));
}
if(ferror(c->fpin)) {
byte_xasprintf((char **)&c->last, "input error: %s", strerror(errno));
@@
-712,9
+714,11
@@
static int readlist(disorder_client *c, char ***vecp, int *nvecp) {
if(nvecp)
*nvecp = v.nvec;
*vecp = v.vec;
if(nvecp)
*nvecp = v.nvec;
*vecp = v.vec;
+ xfree(l);
return 0;
}
return 0;
}
- vector_append(&v, l + (*l == '.'));
+ vector_append(&v, xstrdup(l + (*l == '.')));
+ xfree(l);
}
if(ferror(c->fpin)) {
byte_xasprintf((char **)&c->last, "input error: %s", strerror(errno));
}
if(ferror(c->fpin)) {
byte_xasprintf((char **)&c->last, "input error: %s", strerror(errno));