mirror of
https://github.com/Motion-Project/motion.git
synced 2026-02-07 05:22:06 -05:00
Revise free process to close leaks
This commit is contained in:
@@ -385,7 +385,10 @@ static void algsec_params_deinit(ctx_algsec_model &algmdl)
|
||||
{
|
||||
if (algmdl.algsec_params != NULL){
|
||||
util_parms_free(algmdl.algsec_params);
|
||||
util_free_var(algmdl.algsec_params);
|
||||
if (algmdl.algsec_params != NULL) {
|
||||
free(algmdl.algsec_params);
|
||||
}
|
||||
algmdl.algsec_params = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -558,7 +561,10 @@ void algsec_deinit(ctx_cam *cam)
|
||||
}
|
||||
}
|
||||
if (cam->algsec->image_norm != NULL){
|
||||
util_free_var(cam->algsec->image_norm);
|
||||
if (cam->algsec->image_norm != NULL) {
|
||||
free(cam->algsec->image_norm);
|
||||
}
|
||||
cam->algsec->image_norm = NULL;
|
||||
}
|
||||
|
||||
if (waitcnt == 1000){
|
||||
|
||||
Reference in New Issue
Block a user