aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPřemysl Janouch <p.janouch@gmail.com>2017-01-27 01:15:05 +0100
committerPřemysl Janouch <p.janouch@gmail.com>2017-01-27 01:15:05 +0100
commit2a0e968924b467f684d771e90db8afa92b7c12bb (patch)
treef353e1aac61bf8b2a67d7400e70d167f0b3e6111
parent9d81b137e7f3f191a2616e65a476541109d86348 (diff)
downloadhex-2a0e968924b467f684d771e90db8afa92b7c12bb.tar.gz
hex-2a0e968924b467f684d771e90db8afa92b7c12bb.tar.xz
hex-2a0e968924b467f684d771e90db8afa92b7c12bb.zip
Plug some leaks
-rw-r--r--hex.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/hex.c b/hex.c
index ade7d32..cc06426 100644
--- a/hex.c
+++ b/hex.c
@@ -711,6 +711,7 @@ app_draw_footer (void)
row_buffer_align (&buf, COLS - right.len, APP_ATTR (BAR));
row_buffer_append (&buf, right.str, APP_ATTR (BAR));
app_flush_buffer (&buf, COLS, APP_ATTR (BAR));
+ str_free (&right);
int64_t end_addr = g_ctx.data_offset + g_ctx.data_len;
if (g_ctx.view_cursor < g_ctx.data_offset
@@ -850,6 +851,7 @@ app_lua_coder_free (void *coder)
struct app_lua_coder *self = coder;
luaL_unref (g_ctx.L, LUA_REGISTRYINDEX, self->ref_decode);
luaL_unref (g_ctx.L, LUA_REGISTRYINDEX, self->ref_detect);
+ free (self);
}
static int
@@ -2024,6 +2026,7 @@ main (int argc, char *argv[])
#ifdef HAVE_LUA
str_map_free (&g_ctx.coders);
+ lua_close (g_ctx.L);
#endif // HAVE_LUA
return 0;