flose files & free memory when not needed
[debian/dhcpd-pools.git] / src / other.c
index b5b9290..fe5f34c 100644 (file)
@@ -94,6 +94,8 @@ void clean_up(void)
        free(config.dhcpdlease_file);
        free(config.output_file);
        free(ranges);
+       free(leases);
+       free(touches);
        free(shared_net_names);
        free(shared_networks);
 }
@@ -109,6 +111,7 @@ void print_version(void)
                "This is free software: you are free to change and redistribute it.\n");
        fprintf(stdout,
                "There is NO WARRANTY, to the extent permitted by law.\n");
+        exit(EXIT_SUCCESS);
 }
 
 void usage(int status)