Commit 1c738820 authored by Vadim Pisarevsky's avatar Vadim Pisarevsky

fixed resource leak in lsvmparser (ticket #1390)

parent 65e036fe
......@@ -735,9 +735,8 @@ int LSVMparser(const char * filename, CvLSVMFilterObject *** model, int *last, i
//printf("parse : %s\n", filename);
xmlf = fopen(filename, "rb");
if(xmlf == NULL){
return LSVM_PARSER_FILE_NOT_FOUND;
}
if(xmlf == NULL)
return LSVM_PARSER_FILE_NOT_FOUND;
i = 0;
j = 0;
......@@ -767,7 +766,9 @@ int LSVMparser(const char * filename, CvLSVMFilterObject *** model, int *last, i
}
}
}
return LATENT_SVM_OK;
fclose(xmlf);
return LATENT_SVM_OK;
}
int loadModel(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment