commit 46f780a4116ced91784633de6c37a654e1dac1e4
parent 965d481b847bbd0e6385ac5ba530c7e8b2bafb56
Author: Sweets <Sweets@users.noreply.github.com>
Date: Mon, 29 Jun 2020 17:38:11 -0700
#4
Diffstat:
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/format.c b/format.c
@@ -44,6 +44,7 @@ void output_notification(gchar *app_name, guint32 replaces_id, gchar *app_icon,
char *escaped_str = (char *)calloc(512, sizeof(char));
sprintf(string, "{ \"app_name\": \"%s\"", escape_quotes(app_name, escaped_str));
+ free(escaped_str);
#ifdef RECEIVE_APP_ICON
sprintf(string, "%s, \"app_icon\": \"%s\"", string, escape_quotes(app_icon, escaped_str));
@@ -59,12 +60,10 @@ void output_notification(gchar *app_name, guint32 replaces_id, gchar *app_icon,
sprintf(string, "%s, \"timeout\": %d, \"summary\": \"%s\"", string, timeout, escape_quotes(summary, escaped_str));
sprintf(string, "%s, \"body\": \"%s\" }", string, escape_quotes(body, escaped_str));
-
#endif
printf("%s\n", string);
fflush(stdout);
free(string);
- free(escaped_str);
}