summaryrefslogtreecommitdiff
path: root/src/libelfu/model/section.c
diff options
context:
space:
mode:
authornorly <ny-git@enpas.org>2013-06-20 23:25:09 +0100
committernorly <ny-git@enpas.org>2013-06-20 23:25:09 +0100
commitfb56823e86ceff5e340a691ef2a6d5df81e02fac (patch)
treedf7750e090cafaaba6572f43929d1d5874e58645 /src/libelfu/model/section.c
parentfd5d1e4f3c968fa87b46ef1ca94f8b613df121ff (diff)
Add Elf/Phdr/Scn alloc/destroy
Diffstat (limited to 'src/libelfu/model/section.c')
-rw-r--r--src/libelfu/model/section.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/libelfu/model/section.c b/src/libelfu/model/section.c
index c93c5c8..9ef6fd8 100644
--- 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);
+}