diff --git a/CHANGELOG.md b/CHANGELOG.md index 55f1151e89a..2064b2ac79d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -559,6 +559,7 @@ Docs: https://docs.openclaw.ai - macOS/remote gateway: stop PortGuardian from killing Docker Desktop and other external listeners on the gateway port in remote mode, so containerized and tunneled gateway setups no longer lose their port-forward owner on app startup. (#6755) Thanks @teslamint. - Feishu/streaming recovery: clear stale `streamingStartPromise` when card creation fails (HTTP 400) so subsequent messages can retry streaming instead of silently dropping all future replies. Fixes #43322. - Exec/env sandbox: block JVM agent injection (`JAVA_TOOL_OPTIONS`, `_JAVA_OPTIONS`, `JDK_JAVA_OPTIONS`), Python breakpoint hijack (`PYTHONBREAKPOINT`), and .NET startup hooks (`DOTNET_STARTUP_HOOKS`) from the host exec environment. (#49025) +- Android/camera clip cleanup: delete temporary clip files even when `readBytes()` fails so failed clip captures do not leak cache storage. (#41890) Thanks @Kaneki-x. ### Security diff --git a/apps/android/app/src/main/java/ai/openclaw/app/node/CameraHandler.kt b/apps/android/app/src/main/java/ai/openclaw/app/node/CameraHandler.kt index 3e7881f2625..784c14d6669 100644 --- a/apps/android/app/src/main/java/ai/openclaw/app/node/CameraHandler.kt +++ b/apps/android/app/src/main/java/ai/openclaw/app/node/CameraHandler.kt @@ -134,9 +134,11 @@ class CameraHandler( } val bytes = withContext(Dispatchers.IO) { - val b = filePayload.file.readBytes() - filePayload.file.delete() - b + try { + filePayload.file.readBytes() + } finally { + filePayload.file.delete() + } } val base64 = android.util.Base64.encodeToString(bytes, android.util.Base64.NO_WRAP) clipLog("returning base64 payload")