Fix RESOURCE_LEAK issue
[platform/core/appfw/watchface-complication.git] / unittest / src / test-watchface-complication-provider.cc
index 94fd3dd..0e25687 100644 (file)
@@ -695,6 +695,8 @@ TEST_F(CWCP, watchface_complication_provider_event_get_context)
   bundle_free(touch_data);
   bundle_free(shared);
   bundle_free(context);
+  if (ret == WATCHFACE_COMPLICATION_ERROR_NONE)
+    bundle_free(ret_context);
   EXPECT_EQ(WATCHFACE_COMPLICATION_ERROR_NONE, ret);
 
   ret = watchface_complication_provider_event_get_context(