diff options
author | corvid <corvid@lavabit.com> | 2010-03-01 02:46:04 +0000 |
---|---|---|
committer | corvid <corvid@lavabit.com> | 2010-03-01 02:46:04 +0000 |
commit | cb662545c1c436db72701a262a706b06dfe347c0 (patch) | |
tree | 9fa759cd8c2b935cc2e3ed2547d9434efd55a588 | |
parent | 4b35289e115cc981b237765ef9a4d65c46a2fa1c (diff) |
fix dpid line leak
-rw-r--r-- | dpid/dpid.c | 4 |
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); |