From 0ff10df59d3c7a6fa4e615558b49f979d8e20985 Mon Sep 17 00:00:00 2001 From: Feten Besbes Date: Mon, 2 Dec 2019 14:39:00 +0100 Subject: [PATCH] Refs review #17361: TR69: ACS stops communicating when CPE has 2 interfaces and only first interface receives ACS URL --- http.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/http.c b/http.c index 9374f87..1d65d83 100644 --- a/http.c +++ b/http.c @@ -68,20 +68,20 @@ int http_client_init(struct cwmp *cwmp) } }else { if (asprintf(&http_c.url, "%s", cwmp->conf.acsurl) == -1) { - free(acs_var_stat); free(dhcp_dis); return -1; } } - free(acs_var_stat); } else { if (asprintf(&http_c.url, "%s", cwmp->conf.acsurl) == -1) { - free(dhcp_dis); + if(dhcp_dis) + free(dhcp_dis); return -1; } } #endif - free(dhcp_dis); + if(dhcp_dis) + free(dhcp_dis); #ifdef HTTP_ZSTREAM char *add = strstr(cwmp->conf.acsurl,"://"); if(!add) return -1;