projects
/
petitboot
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4d03d19
)
discover/file: Fix invalid free in replace_file
author
Jeremy Kerr
<jk@ozlabs.org>
Thu, 24 Oct 2013 06:05:17 +0000
(14:05 +0800)
committer
Jeremy Kerr
<jk@ozlabs.org>
Thu, 24 Oct 2013 06:05:17 +0000
(14:05 +0800)
We talloced tempfile, we should be freeing with talloc_free.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
discover/file.c
patch
|
blob
|
history
diff --git
a/discover/file.c
b/discover/file.c
index 4bad0123e12e1154975adbcc0580c0b74e930918..1bde9fb805ba906c95ca4ec24df9d1dc921994af 100644
(file)
--- a/
discover/file.c
+++ b/
discover/file.c
@@
-114,7
+114,7
@@
int replace_file(const char *filename, char *buf, int len)
rc = rename(tempfile, filename);
}
- free(tempfile);
+
talloc_
free(tempfile);
fchmod(fd, 0644);