Signed-off-by: Sven Baars sbaars@codeweavers.com --- dlls/vbscript/global.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/dlls/vbscript/global.c b/dlls/vbscript/global.c index 4b1c23b838c..18504a43b9a 100644 --- a/dlls/vbscript/global.c +++ b/dlls/vbscript/global.c @@ -2423,7 +2423,6 @@ static HRESULT Global_Split(BuiltinDisp *This, VARIANT *args, unsigned args_cnt, } hres = SafeArrayAccessData(sa, (void**)&data); if(FAILED(hres)) { - SafeArrayDestroy(sa); goto error; }
@@ -2440,7 +2439,6 @@ static HRESULT Global_Split(BuiltinDisp *This, VARIANT *args, unsigned args_cnt, hres = VariantCopyInd(data+i, &var); if(FAILED(hres)) { SafeArrayUnaccessData(sa); - SafeArrayDestroy(sa); goto error; } start = indices[i]+delimiterlen; @@ -2452,7 +2450,7 @@ error: V_VT(res) = VT_ARRAY|VT_VARIANT; V_ARRAY(res) = sa; }else { - if (sa) SafeArrayDestroy(sa); + SafeArrayDestroy(sa); }
heap_free(indices);
Signed-off-by: Sven Baars sbaars@codeweavers.com --- dlls/d3dcompiler_43/utils.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/dlls/d3dcompiler_43/utils.c b/dlls/d3dcompiler_43/utils.c index df39716b495..971a5bef9c7 100644 --- a/dlls/d3dcompiler_43/utils.c +++ b/dlls/d3dcompiler_43/utils.c @@ -1450,19 +1450,22 @@ struct hlsl_ir_node *add_assignment(struct list *instrs, struct hlsl_ir_node *lh struct hlsl_type *lhs_type; DWORD writemask = 0;
+ if (!assign) + { + ERR("Out of memory\n"); + return NULL; + } + lhs_type = lhs->data_type; if (lhs_type->type <= HLSL_CLASS_LAST_NUMERIC) { writemask = (1 << lhs_type->dimx) - 1;
if (!(rhs = add_implicit_conversion(instrs, rhs, lhs_type, &rhs->loc))) + { + d3dcompiler_free(assign); return NULL; - } - - if (!assign) - { - ERR("Out of memory\n"); - return NULL; + } }
while (lhs->type != HLSL_IR_LOAD)