From c4d6184eb546b6695cdb05738df9f2a9ea85f67a Mon Sep 17 00:00:00 2001 From: Mark Haverkamp Date: Wed, 25 May 2005 20:42:45 +0000 Subject: [PATCH] Fix memory leak. (Logical change 1.192) git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@631 fd59a12c-fef9-0310-b244-a6a79926bd2f --- test/subscription.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/subscription.c b/test/subscription.c index 827edc01..4bcf5dc7 100644 --- a/test/subscription.c +++ b/test/subscription.c @@ -170,7 +170,8 @@ test_subscription() if (pfd.revents & (POLLERR|POLLHUP)) { printf("Error recieved on poll fd %lld\n", fd); - return SA_AIS_ERR_BAD_OPERATION; + result = SA_AIS_ERR_BAD_OPERATION; + goto sub_fin; } do { result = saEvtDispatch(handle, SA_DISPATCH_ONE); @@ -304,7 +305,7 @@ event_callback( SaEvtSubscriptionIdT subscription_id, } if (event_id == SA_EVT_EVENTID_LOST) { - return; + goto evt_free; } #ifdef TEST_EVENT_ORDER