Hello, All.

   A typical piece of code:

>               // do not assign cryptPlugin directly before key init complete
>               IDbCryptPlugin* p = cryptControl.plugin();
>               keyHolderPlugins.init(p);
>               cryptPlugin = p;
>               cryptPlugin->addRef();

   AFAIU, if call of keyHolderPlugins.init() throw anything, memory will leak 
because p is 
a dumb pointer.
   Call of cryptPlugin->addRef() will bring the counter to two and the plugin 
will never 
be released.

   What have I missed?

-- 
   WBR, SD.

------------------------------------------------------------------------------
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to