src/shell: Plug some small leaks

Spotted by coverity in CID 351284 and 351288.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1950>
This commit is contained in:
Florian Müllner 2021-08-13 03:30:48 +02:00
parent 2fcb7cf3de
commit 506001ebc2
2 changed files with 2 additions and 2 deletions

View File

@ -1249,7 +1249,7 @@ shell_global_reexec_self (ShellGlobal *global)
char *buf;
char *buf_p;
char *buf_end;
GError *error = NULL;
g_autoptr (GError) error = NULL;
if (!g_file_get_contents ("/proc/self/cmdline", &buf, &len, &error))
{

View File

@ -862,7 +862,7 @@ replay_to_json (gint64 time,
gpointer user_data)
{
ReplayToJsonClosure *closure = user_data;
char *event_str;
g_autofree char *event_str = NULL;
if (closure->error != NULL)
return;