From 59c8ba3244278b821fa3c5c8b258a03d6f766443 Mon Sep 17 00:00:00 2001 From: Gerhard Riegler Date: Thu, 15 Jul 2021 19:48:01 +0200 Subject: [PATCH] Fixed OutOfMemory error if initializing fails (#10924) Signed-off-by: Gerhard Riegler Signed-off-by: dw-8 --- .../org/openhab/binding/gardena/internal/GardenaSmartImpl.java | 1 + 1 file changed, 1 insertion(+) diff --git a/bundles/org.openhab.binding.gardena/src/main/java/org/openhab/binding/gardena/internal/GardenaSmartImpl.java b/bundles/org.openhab.binding.gardena/src/main/java/org/openhab/binding/gardena/internal/GardenaSmartImpl.java index cc6d38e78dc92..0624f74e06b01 100644 --- a/bundles/org.openhab.binding.gardena/src/main/java/org/openhab/binding/gardena/internal/GardenaSmartImpl.java +++ b/bundles/org.openhab.binding.gardena/src/main/java/org/openhab/binding/gardena/internal/GardenaSmartImpl.java @@ -133,6 +133,7 @@ public GardenaSmartImpl(String id, GardenaConfig config, GardenaSmartEventListen startWebsockets(); initialized = true; } catch (Exception ex) { + dispose(); throw new GardenaException(ex.getMessage(), ex); } }