Memory fix for C code generated in svm_approx