SF Bug Tracker id 3489999 - UpnpString leaks in genaSubscribe()
Submitted: Yoichi NAKAYAMA ( yoichi ) - 2012-02-21 07:06:35 PST In genaSubscribe() (defined in upnp/src/gena/gena_ctrlpt.c), ActualSID and EventURL will not be freed if ScheduleGenaAutoRenew returns UPNP_E_SUCCESS. This fixes the original issue.
This commit is contained in:
@@ -567,11 +567,9 @@ int genaSubscribe(
|
||||
return_code = ScheduleGenaAutoRenew(client_handle, *TimeOut, newSubscription);
|
||||
|
||||
error_handler:
|
||||
if (return_code != UPNP_E_SUCCESS) {
|
||||
UpnpString_delete(ActualSID);
|
||||
UpnpString_delete(EventURL);
|
||||
UpnpClientSubscription_delete(newSubscription);
|
||||
}
|
||||
UpnpString_delete(ActualSID);
|
||||
UpnpString_delete(EventURL);
|
||||
UpnpClientSubscription_delete(newSubscription);
|
||||
HandleUnlock();
|
||||
SubscribeUnlock();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user