From 81da3d004aa5074b8f93ac9eedb230e73faaf732 Mon Sep 17 00:00:00 2001 From: Marcelo Roberto Jimenez Date: Sun, 26 Feb 2012 21:36:24 -0300 Subject: [PATCH] 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 an issue introduced by the previous fix. --- ChangeLog | 12 ++++++++++++ upnp/src/gena/gena_ctrlpt.c | 3 ++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 63a01ff..d55239b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -299,6 +299,18 @@ Version 1.8.0 Version 1.6.16 ******************************************************************************* +2012-02-24 Marcelo Roberto Jimenez + + 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 an issue introduced by the previous fix. + 2012-02-23 Marcelo Roberto Jimenez SF Bug Tracker id 3489999 - UpnpString leaks in genaSubscribe() diff --git a/upnp/src/gena/gena_ctrlpt.c b/upnp/src/gena/gena_ctrlpt.c index 6c7755d..af2d108 100644 --- a/upnp/src/gena/gena_ctrlpt.c +++ b/upnp/src/gena/gena_ctrlpt.c @@ -565,7 +565,8 @@ int genaSubscribe( error_handler: UpnpString_delete(ActualSID); UpnpString_delete(EventURL); - GenlibClientSubscription_delete(newSubscription); + if (return_code != UPNP_E_SUCCESS) + GenlibClientSubscription_delete(newSubscription); HandleUnlock(); SubscribeUnlock();