projects
/
centaur.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Add Elf/Phdr/Scn alloc/destroy
[centaur.git]
/
src
/
libelfu
/
model
/
section.c
diff --git
a/src/libelfu/model/section.c
b/src/libelfu/model/section.c
index c93c5c80b37114a9a3470bd803af553a9dfcbb83..9ef6fd8f342d89858f52326cbd399ddab83b82ec 100644
(file)
--- a/
src/libelfu/model/section.c
+++ b/
src/libelfu/model/section.c
@@
-219,3
+219,16
@@
ElfuScn* elfu_mScnAlloc()
return ms;
}
+
+void elfu_mScnDestroy(ElfuScn* ms)
+{
+ assert(ms);
+
+ // TODO: Free symtab/reltab
+
+ if (ms->databuf) {
+ free(ms->databuf);
+ }
+
+ free(ms);
+}