Skip to content

Commit

Permalink
Valgrind is coming up pretty sparse now after these fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
John Kordich authored and John Kordich committed Apr 30, 2015
1 parent c6231a4 commit bb26778
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -930,6 +930,7 @@ MI_Result CallConsistencyEngine(
result = MergePartialConfigurations(&lcmContext, moduleManager, GetPendingConfigFileName(), GetPartialConfigBaseDocumentInstanceFileName(), cimErrorDetails);
if (result != MI_RESULT_OK)
{
MSFT_DSCMetaConfiguration_Delete((MSFT_DSCMetaConfiguration *)metaConfigInstance);
moduleManager->ft->Close(moduleManager, NULL);
SetLCMStatusReady(lcmContext, result);
return result;
Expand Down Expand Up @@ -2477,7 +2478,11 @@ MI_Result ProcessPartialConfigurations(
{
DSC_WriteWarning2Param((MI_Context*) lcmContext->context, ID_LCMHELPER_APPLYPARTIALCONFIG_FAILED_WITHERROR, searchBucket.key, value.string);
}
*cimErrorDetails = NULL;//Clear error details
if (*cimErrorDetails != NULL)
{
MI_Instance_Delete(*cimErrorDetails);
*cimErrorDetails = NULL;//Clear error details
}
flagPartialConfigFailedToApply = MI_TRUE;
r = MI_RESULT_OK;
}
Expand Down
4 changes: 3 additions & 1 deletion LCM/dsc/engine/ca/CAInfrastructure/WebPullClient.c
Original file line number Diff line number Diff line change
Expand Up @@ -2370,6 +2370,7 @@ static MI_Result GetModuleNameVersionTable(MI_Char* mofFileLocation,
r = MI_Deserializer_DeserializeInstanceArray(&deserializer, 0, &options, 0, pbuffer, contentSize, &miClassArray, &readBytes, &miInstanceArray, extendedError);
if (r != MI_RESULT_OK)
{
DSC_free(miApp);
return r;
}

Expand All @@ -2379,7 +2380,6 @@ static MI_Result GetModuleNameVersionTable(MI_Char* mofFileLocation,
pbuffer = NULL;
}


for (i = 0; i < miInstanceArray->size; ++i)
{
// compare classname with BASE_DOCUMENT_CLASSNAME. Skip if same
Expand Down Expand Up @@ -2457,6 +2457,7 @@ static MI_Result GetModuleNameVersionTable(MI_Char* mofFileLocation,
MI_Deserializer_Close(&deserializer);
MI_OperationOptions_Delete(&options);
CleanUpDeserializerInstanceCache(miInstanceArray);
DSC_free(miApp);
return GetCimMIError2Params(MI_RESULT_FAILED, extendedError, ID_PULL_INVALIDMODULEVERSION, moduleVersion.string, moduleName.string);
}
}
Expand All @@ -2468,6 +2469,7 @@ static MI_Result GetModuleNameVersionTable(MI_Char* mofFileLocation,
MI_OperationOptions_Delete(&options);

CleanUpDeserializerInstanceCache(miInstanceArray);
DSC_free(miApp);

return MI_RESULT_OK;
}
Expand Down

0 comments on commit bb26778

Please sign in to comment.