From 67d1131bbb66be610b6b4c2cfb277d1d13e06687 Mon Sep 17 00:00:00 2001 From: Sebastian Ramacher Date: Fri, 29 Apr 2016 20:48:49 +0200 Subject: [PATCH] Fix infinite loop on NULL Signed-off-by: Sebastian Ramacher --- zathura/completion.c | 4 ++-- zathura/marks.c | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/zathura/completion.c b/zathura/completion.c index 002266b..d073a5b 100644 --- a/zathura/completion.c +++ b/zathura/completion.c @@ -294,11 +294,11 @@ cc_bookmarks(girara_session_t* session, const char* input) error_free: - if (completion) { + if (completion != NULL) { girara_completion_free(completion); } - if (group) { + if (group != NULL) { girara_completion_group_free(group); } diff --git a/zathura/marks.c b/zathura/marks.c index 5ec6bf2..5658a07 100644 --- a/zathura/marks.c +++ b/zathura/marks.c @@ -160,6 +160,7 @@ cmd_marks_delete(girara_session_t* session, girara_list_t* argument_list) GIRARA_LIST_FOREACH(argument_list, char*, iter, key_string) if (key_string == NULL) { + girara_list_iterator_next(iter); continue; }