From 59ace47e99699dfefeb4ea10fc1f41288d0b951d Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Sat, 2 Feb 2008 01:01:56 +0100 Subject: [PATCH] src/sn-evolution.c: Free the population before exiting. --- src/sn-evolution.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/sn-evolution.c b/src/sn-evolution.c index f43906e..d3184d9 100644 --- a/src/sn-evolution.c +++ b/src/sn-evolution.c @@ -245,6 +245,19 @@ int main (int argc, char **argv) sn_network_show (population[best_index].network); } + { + int i; + + for (i = 0; i < population_size; i++) + { + sn_network_destroy (population[i].network); + population[i].network = NULL; + } + + free (population); + population = 0; + } + return (0); } /* int main */ -- 2.11.0