From cb662545c1c436db72701a262a706b06dfe347c0 Mon Sep 17 00:00:00 2001 From: corvid Date: Mon, 1 Mar 2010 02:46:04 +0000 Subject: fix dpid line leak --- dpid/dpid.c | 4 +--- 1 file changed, 1 insertion(+), 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); -- cgit v1.2.3