Fix infinite loop on NULL

Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
This commit is contained in:
Sebastian Ramacher 2016-04-29 20:48:49 +02:00
parent 2805cf1f2c
commit 67d1131bbb
2 changed files with 3 additions and 2 deletions

View File

@ -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);
}

View File

@ -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;
}