{
#if defined(MAGICKCORE_HAVE_DISTRIBUTE_CACHE)
char
- service[MagickPathExtent];
-
- const char
+ service[MagickPathExtent],
*shared_secret;
int
*/
*session_key=0;
shared_secret=GetPolicyValue("shared-secret");
- if (shared_secret == (const char *) NULL)
+ if (shared_secret == (char *) NULL)
{
+ shared_secret=DestroyString(shared_secret);
(void) ThrowMagickException(exception,GetMagickModule(),CacheError,
"DistributedPixelCache","'%s'","shared secret expected");
return(-1);
}
+ shared_secret=DestroyString(shared_secret);
#if defined(MAGICKCORE_WINDOWS_SUPPORT)
NTInitializeWinsock(MagickTrue);
#endif
static HANDLER_RETURN_TYPE DistributePixelCacheClient(void *socket)
{
- const char
+ char
*shared_secret;
ExceptionInfo
Distributed pixel cache client.
*/
shared_secret=GetPolicyValue("shared-secret");
- if (shared_secret == (const char *) NULL)
+ if (shared_secret == (char *) NULL)
ThrowFatalException(CacheFatalError,"shared secret expected");
p=session;
(void) CopyMagickString((char *) p,shared_secret,MagickPathExtent);
p+=strlen(shared_secret);
+ shared_secret=DestroyString(shared_secret);
random_info=AcquireRandomInfo();
secret=GetRandomKey(random_info,DPCSessionKeyLength);
(void) memcpy(p,GetStringInfoDatum(secret),DPCSessionKeyLength);