[3.0] Fix leaking ResourceRequest reported by Valgrind 25/119125/1
authorNick Holland <nick.holland@partner.samsung.com>
Wed, 15 Mar 2017 14:01:43 +0000 (14:01 +0000)
committerNick Holland <nick.holland@partner.samsung.com>
Wed, 15 Mar 2017 14:04:07 +0000 (14:04 +0000)
Memory leak caused by ResourceRequest
copy constructor not deleting existing memory.

Change-Id: I2fec473a6ca5aad803f20d7bfd8190ae6b7111dd

dali/integration-api/resource-request.h

index 6690c64..21bfca8 100644 (file)
@@ -123,6 +123,10 @@ public:
     if( this != &rhs )
     {
       id = rhs.id;
+      if( type )
+      {
+        delete type;
+      }
       type = rhs.type->Clone();
       path = rhs.path;
       resource = rhs.resource;