diff options
Diffstat (limited to 'src/db-parse-context.c')
-rw-r--r-- | src/db-parse-context.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/db-parse-context.c b/src/db-parse-context.c index 4f4264e..ffdd7c4 100644 --- a/src/db-parse-context.c +++ b/src/db-parse-context.c @@ -53,6 +53,16 @@ db_parse_context_new (const unsigned char *buffer, off_t len) return result; } +void +db_parse_context_destroy (DBParseContext *ctx, gboolean unmap) +{ + g_return_if_fail (ctx != NULL); + + if (unmap) { + munmap ((void*)ctx->buffer, ctx->total_len); + } + g_free (ctx); +} static void db_parse_context_set_header_len (DBParseContext *ctx, off_t len) |