From 9a6e8ac46f26965c4aa2dafad84053ad4e4a5e01 Mon Sep 17 00:00:00 2001 From: Sergey Lisitsyn Date: Sat, 30 Jul 2011 23:48:37 +0400 Subject: [PATCH] Fixed wrong SG_FREE in ARPACK wrapper leading to segfault --- src/shogun/mathematics/arpack.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shogun/mathematics/arpack.cpp b/src/shogun/mathematics/arpack.cpp index 4dd5480770f..7c5f6d76ac2 100644 --- a/src/shogun/mathematics/arpack.cpp +++ b/src/shogun/mathematics/arpack.cpp @@ -141,7 +141,7 @@ void arpack_dsaupd(double* matrix, int n, int nev, const char* which, } } } while ((ido==1)||(ido==-1)); - if (!pos) SG_FREE(ipiv); + if (!pos && mode==3) SG_FREE(ipiv); if (mode==3) SG_FREE(tmp); // check if DSAUPD failed