1
0
This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
ZyXEL_PMG5617GA/package/libs/clinkc/patches/038-BUGFIX_Memory_leak.patch
2022-11-27 10:16:14 +00:00

41 lines
1.3 KiB
Diff

Index: clinkc/src/cybergarage/http/chttp_packet.c
===================================================================
--- clinkc.orig/src/cybergarage/http/chttp_packet.c 2014-12-01 11:15:35.518003370 +0800
+++ clinkc/src/cybergarage/http/chttp_packet.c 2014-12-01 11:15:35.658003373 +0800
@@ -726,6 +726,8 @@
fclose(fp);
}
+ free(lst);
+
return (size*1024);
}
Index: clinkc/src/cybergarage/upnp/cdevice.c
===================================================================
--- clinkc.orig/src/cybergarage/upnp/cdevice.c 2014-12-01 11:15:35.302003366 +0800
+++ clinkc/src/cybergarage/upnp/cdevice.c 2014-12-01 11:15:59.769837891 +0800
@@ -2000,15 +2000,20 @@
{
CgUpnpService *service;
CgUpnpDevice *childDev;
+ CgNetURL *suburl;
cg_log_debug_l4("Entering...\n");
if (cg_strlen(url) <= 0)
return NULL;
-
+
for (service=cg_upnp_device_getservices(dev); service != NULL; service = cg_upnp_service_next(service)) {
- if (cg_streq(cg_net_url_getpath(cg_upnp_service_geteventsuburl(service)), url) == TRUE)
+ suburl = cg_upnp_service_geteventsuburl(service);
+ if (cg_streq(cg_net_url_getpath(suburl), url) == TRUE){
+ cg_net_url_delete(suburl);
return service;
+ }
+ cg_net_url_delete(suburl);
}
for (childDev = cg_upnp_device_getdevices(dev); childDev != NULL; childDev = cg_upnp_device_next(childDev)) {