Fix two memdbg refcount errors master
authorAndre Heinecke <aheinecke@intevation.de>
Mon, 26 Nov 2018 13:41:24 +0000 (14:41 +0100)
committerAndre Heinecke <aheinecke@intevation.de>
Mon, 26 Nov 2018 13:41:24 +0000 (14:41 +0100)
* src/mapihelp.cpp (is_really_cms_encrypted): Fix references.

--
This code is almost never run so that did not happen before.

src/mapihelp.cpp

index 3949ea3..acd28c8 100644 (file)
@@ -856,7 +856,8 @@ is_really_cms_encrypted (LPMESSAGE message)
                  SRCNAME, __func__, hr);
       TRETURN -1;
     }
-      
+  memdbg_addRef (mapitable);
+
   hr = HrQueryAllRows (mapitable, (LPSPropTagArray)&propAttNum,
                        NULL, NULL, 0, &mapirows);
   if (FAILED (hr))
@@ -916,6 +917,7 @@ is_really_cms_encrypted (LPMESSAGE message)
       goto leave;
     }
 
+  memdbg_addRef (stream);
   hr = stream->Read (buffer, sizeof buffer, &nread);
   if ( hr != S_OK )
     {