From 21a779235d009a386062f733f650bf69d4de4077 Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Fri, 28 Sep 2018 16:08:20 +0200 Subject: [PATCH] mindtct: Fix powmax_dirs leak on error A copy/paste error meant we were trying to free a variable we only just failed to allocate. Spotted by Seth Arnold Closes: #81 --- libfprint/nbis/mindtct/init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libfprint/nbis/mindtct/init.c b/libfprint/nbis/mindtct/init.c index a718279..fd65f9c 100644 --- a/libfprint/nbis/mindtct/init.c +++ b/libfprint/nbis/mindtct/init.c @@ -725,7 +725,7 @@ int alloc_power_stats(int **owis, double **opowmaxs, int **opowmax_dirs, /* Free memory allocated to this point. */ free(wis); free(powmaxs); - free(pownorms); + free(powmax_dirs); fprintf(stderr, "ERROR : alloc_power_stats : malloc : pownorms\n"); return(-53); }