From a8a66e51ef5d9506a5458425c7e749935afa649d Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Sun, 20 Jul 2014 16:42:59 +0200 Subject: qml: Make ownership of CompiledUnit more clear The coverity scan utility didn't understand the code flow and assumed the compiledData would be leaked. Use a QScopedPointer and have the ::backendCompileStep() forward the ownership. From what I see the code has not leaked memory. Fixes: CID 10605, CID 10607 Change-Id: I7759f681871bbe12e2aa320a5f39c47c70f4e4e0 Reviewed-by: Simon Hausmann --- src/qml/jit/qv4isel_masm_p.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/qml/jit/qv4isel_masm_p.h') diff --git a/src/qml/jit/qv4isel_masm_p.h b/src/qml/jit/qv4isel_masm_p.h index 83d2464ef3..9c0bc73a65 100644 --- a/src/qml/jit/qv4isel_masm_p.h +++ b/src/qml/jit/qv4isel_masm_p.h @@ -254,7 +254,7 @@ private: QSet _removableJumps; Assembler* _as; - CompilationUnit *compilationUnit; + QScopedPointer compilationUnit; QQmlEnginePrivate *qmlEngine; }; -- cgit v1.2.3