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
This commit is contained in:
Bastien Nocera 2018-09-28 16:08:20 +02:00
parent 1006467f33
commit 21a779235d

View file

@ -725,7 +725,7 @@ int alloc_power_stats(int **owis, double **opowmaxs, int **opowmax_dirs,
/* Free memory allocated to this point. */ /* Free memory allocated to this point. */
free(wis); free(wis);
free(powmaxs); free(powmaxs);
free(pownorms); free(powmax_dirs);
fprintf(stderr, "ERROR : alloc_power_stats : malloc : pownorms\n"); fprintf(stderr, "ERROR : alloc_power_stats : malloc : pownorms\n");
return(-53); return(-53);
} }