fix double free in spec function 43/16443/1
Antoine ELIAS [Tue, 5 May 2015 11:51:42 +0000 (13:51 +0200)]
test_run("linear_algebra","bug_3652")

Change-Id: I1f67fa8e7daacf459c98001a4776169915701f39

scilab/modules/linear_algebra/sci_gateway/cpp/sci_spec.cpp

index 10355a7..49cb7dc 100644 (file)
@@ -525,7 +525,7 @@ types::Function::ReturnValue sci_spec(types::typed_list &in, int _iRetCount, typ
         {
             vFreeDoubleComplexFromPointer(pR);
         }
-        if (pDblB->isComplex())
+        if (bIsComplex && pDblB->isComplex())
         {
             vFreeDoubleComplexFromPointer((doublecomplex*)pDataB);
         }