fixed resource leak in lsvmparser (ticket #1390)
This commit is contained in:
parent
65e036fe6d
commit
1c738820de
@ -735,9 +735,8 @@ int LSVMparser(const char * filename, CvLSVMFilterObject *** model, int *last, i
|
|||||||
//printf("parse : %s\n", filename);
|
//printf("parse : %s\n", filename);
|
||||||
|
|
||||||
xmlf = fopen(filename, "rb");
|
xmlf = fopen(filename, "rb");
|
||||||
if(xmlf == NULL){
|
if(xmlf == NULL)
|
||||||
return LSVM_PARSER_FILE_NOT_FOUND;
|
return LSVM_PARSER_FILE_NOT_FOUND;
|
||||||
}
|
|
||||||
|
|
||||||
i = 0;
|
i = 0;
|
||||||
j = 0;
|
j = 0;
|
||||||
@ -767,6 +766,8 @@ int LSVMparser(const char * filename, CvLSVMFilterObject *** model, int *last, i
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fclose(xmlf);
|
||||||
return LATENT_SVM_OK;
|
return LATENT_SVM_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user