From edae10ab163efdaa0311fff8ebf53f1f62d89dd4 Mon Sep 17 00:00:00 2001 From: wuqihy Date: Mon, 2 Sep 2019 18:08:10 +0800 Subject: [PATCH] =?UTF-8?q?Add=20aaa-12=20=E4=BF=AE=E6=94=B9dhcp=20lib=20S?= =?UTF-8?q?OL=20=E4=BF=AE=E6=94=B9dhcp=20lib=20=E4=BF=AE=E6=94=B9=E4=BA=BA?= =?UTF-8?q?=EF=BC=9Awuqihy=20=E6=A3=80=E8=A7=86=E4=BA=BA=EF=BC=9Ayinbin?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: wuqihy --- Platform/user/configm/config-server/dhcp_config/dhcp_lib.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Platform/user/configm/config-server/dhcp_config/dhcp_lib.c b/Platform/user/configm/config-server/dhcp_config/dhcp_lib.c index 582c72204..edc7d06cf 100644 --- a/Platform/user/configm/config-server/dhcp_config/dhcp_lib.c +++ b/Platform/user/configm/config-server/dhcp_config/dhcp_lib.c @@ -42,6 +42,9 @@ int del_interface_dhcp_cb(BR_EVENT_TYPE event_type, br_event_t event_arg) if(mask){ free(mask); } + if(cmd){ + free(cmd); + } /*ÔËÐÐÅäÖÃÎļþ*/ system("service isc-dhcp-server restart"); return ret; @@ -225,9 +228,11 @@ int file_consist_str(char *fname, char *str){ while((fgets(line,1000,fp))!=NULL){ char *p = strstr(line, str); if(p){ + fclose(fp); return TRUE; } } + fclose(fp); return FALSE; }