mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2024-12-29 08:36:01 +01:00
Fix GString related memory leaks
This patch fixes a couple of GString related memory leaks. There is one left in the cmd_set() function for the 's' type settings, but to fix it we need to rework settings architecture a bit. Signed-off-by: Pavel Borzenkov <pavel.borzenkov@gmail.com> Signed-off-by: Sebastian Ramacher <s.ramacher@gmx.at>
This commit is contained in:
parent
7a1a4d6ddd
commit
2e7dac75de
1 changed files with 4 additions and 0 deletions
|
@ -3133,11 +3133,13 @@ cmd_open_bookmark(int argc, char** argv)
|
|||
if(!strcmp(id->str, Zathura.Bookmarks.bookmarks[i].id))
|
||||
{
|
||||
set_page(Zathura.Bookmarks.bookmarks[i].page);
|
||||
g_string_free(id, TRUE);
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
notify(WARNING, "No matching bookmark found");
|
||||
g_string_free(id, TRUE);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -3202,10 +3204,12 @@ cmd_delete_bookmark(int argc, char** argv)
|
|||
|
||||
Zathura.Bookmarks.number_of_bookmarks--;
|
||||
|
||||
g_string_free(id, TRUE);
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
g_string_free(id, TRUE);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue