aboutsummaryrefslogtreecommitdiff
path: root/dpid
diff options
context:
space:
mode:
authorcorvid <corvid@lavabit.com>2010-03-01 02:46:04 +0000
committercorvid <corvid@lavabit.com>2010-03-01 02:46:04 +0000
commitcb662545c1c436db72701a262a706b06dfe347c0 (patch)
tree9fa759cd8c2b935cc2e3ed2547d9434efd55a588 /dpid
parent4b35289e115cc981b237765ef9a4d65c46a2fa1c (diff)
fix dpid line leak
Diffstat (limited to 'dpid')
-rw-r--r--dpid/dpid.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/dpid/dpid.c b/dpid/dpid.c
index 246894ae..d8bfeb96 100644
--- a/dpid/dpid.c
+++ b/dpid/dpid.c
@@ -468,7 +468,7 @@ int fill_services_list(struct dp *attlist, int numdpis, Dlist **services_list)
*services_list = dList_new(8);
/* dpidrc parser loop */
- while ((line = dGetline(dpidrc_stream)) != NULL) {
+ for (;(line = dGetline(dpidrc_stream)) != NULL; dFree(line)) {
st = dParser_parse_rc_line(&line, &service, &path);
if (st < 0) {
MSG_ERR("dpid: Syntax error in %s: service=\"%s\" path=\"%s\"\n",
@@ -498,8 +498,6 @@ int fill_services_list(struct dp *attlist, int numdpis, Dlist **services_list)
/* if the dpi exist bind service and dpi */
if (i < numdpis)
s->dp_index = i;
-
- dFree(line);
}
fclose(dpidrc_stream);