cppcheck reported:
[sklearn/svm/src/liblinear/linear.cpp:2240]: (error) Mismatching allocation and 
deallocation: C
[sklearn/svm/src/liblinear/linear.cpp:2258]: (error) Mismatching allocation and 
deallocation: C
[sklearn/svm/src/liblinear/linear.cpp:2303]: (error) Mismatching allocation and 
deallocation: C

Signed-off-by: Thomas Jarosch <[email protected]>
---
 sklearn/svm/src/liblinear/linear.cpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Please CC: comments, I'm not on the list.

diff --git a/sklearn/svm/src/liblinear/linear.cpp 
b/sklearn/svm/src/liblinear/linear.cpp
index 55e85d3..fa310fd 100644
--- a/sklearn/svm/src/liblinear/linear.cpp
+++ b/sklearn/svm/src/liblinear/linear.cpp
@@ -2237,7 +2237,7 @@ static void train_one(const problem *prob, const 
parameter *param, double *w, do
                        tron_obj.set_print_string(liblinear_print_string);
                        tron_obj.tron(w);
                        delete fun_obj;
-                       delete C;
+                       delete [] C;
                        break;
                }
                case L2R_L2LOSS_SVC:
@@ -2255,7 +2255,7 @@ static void train_one(const problem *prob, const 
parameter *param, double *w, do
                        tron_obj.set_print_string(liblinear_print_string);
                        tron_obj.tron(w);
                        delete fun_obj;
-                       delete C;
+                       delete [] C;
                        break;
                }
                case L2R_L2LOSS_SVC_DUAL:
@@ -2300,7 +2300,7 @@ static void train_one(const problem *prob, const 
parameter *param, double *w, do
                        tron_obj.set_print_string(liblinear_print_string);
                        tron_obj.tron(w);
                        delete fun_obj;
-                       delete C;
+                       delete [] C;
                        break;
 
                }
-- 
1.7.11.7


------------------------------------------------------------------------------
Master HTML5, CSS3, ASP.NET, MVC, AJAX, Knockout.js, Web API and
much more. Get web development skills now with LearnDevNow -
350+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122812
_______________________________________________
Scikit-learn-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general

Reply via email to