aboutsummaryrefslogtreecommitdiff
path: root/hex.c
diff options
context:
space:
mode:
authorPřemysl Eric Janouch <p@janouch.name>2020-10-27 11:53:03 +0100
committerPřemysl Eric Janouch <p@janouch.name>2020-10-27 11:53:03 +0100
commit38694ea5205004fa4a5493fe02c3a31fb6b2f532 (patch)
treed83af60470de47c921236e3b57fa4d76ed7b24d0 /hex.c
parent0304e4fcee0ceb222485e2eca32a1a917ebac964 (diff)
downloadhex-38694ea5205004fa4a5493fe02c3a31fb6b2f532.tar.gz
hex-38694ea5205004fa4a5493fe02c3a31fb6b2f532.tar.xz
hex-38694ea5205004fa4a5493fe02c3a31fb6b2f532.zip
Bump liberty and termo
Diffstat (limited to 'hex.c')
-rw-r--r--hex.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/hex.c b/hex.c
index 5cb1c3c..afc14db 100644
--- a/hex.c
+++ b/hex.c
@@ -339,9 +339,9 @@ app_free_context (void)
free (g_ctx.marks_by_offset);
free (g_ctx.offset_entries);
- free (g_ctx.message);
+ cstr_set (&g_ctx.message, NULL);
- free (g_ctx.filename);
+ cstr_set (&g_ctx.filename, NULL);
free (g_ctx.data);
if (g_ctx.tk)
@@ -1792,8 +1792,7 @@ app_log_handler (void *user_data, const char *quote, const char *fmt,
fprintf (stderr, "%s\n", message.str);
else
{
- free (g_ctx.message);
- g_ctx.message = xstrdup (message.str);
+ cstr_set (&g_ctx.message, xstrdup (message.str));
g_ctx.message_attr = (intptr_t) user_data;
app_invalidate ();
}