git.asbjorn.biz
/
debian
/
dhcpd-pools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b111630
)
flose files & free memory when not needed
author
Sami Kerola
<kerolasa@iki.fi>
Sat, 19 Mar 2011 19:39:01 +0000
(20:39 +0100)
committer
Sami Kerola
<kerolasa@iki.fi>
Sat, 19 Mar 2011 19:39:01 +0000
(20:39 +0100)
Fixes to issues found with valgrind.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
src/getdata.c
patch
|
blob
|
history
src/other.c
patch
|
blob
|
history
diff --git
a/src/getdata.c
b/src/getdata.c
index
7fbe4d0
..
c25d87e
100644
(file)
--- a/
src/getdata.c
+++ b/
src/getdata.c
@@
-163,6
+163,7
@@
int parse_leases(void)
if (macaddr != NULL) {
free(macstring);
}
+ fclose(dhcpd_leases);
return 0;
}
@@
-452,5
+453,6
@@
char *parse_config(int is_include, char *config_file,
}
}
free(word);
+ fclose(dhcpd_config);
return next_free_shared_name;
}
diff --git
a/src/other.c
b/src/other.c
index
42f86ca
..
fe5f34c
100644
(file)
--- a/
src/other.c
+++ b/
src/other.c
@@
-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);
}