Commit 21a77923 authored by Bastien Nocera's avatar Bastien Nocera

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
parent 1006467f
......@@ -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);
}
......
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