Fix a memory leak

Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
This commit is contained in:
Marwan Tanager 2013-06-30 18:06:49 +02:00 committed by Sebastian Ramacher
parent 486698d9fb
commit a0c8f4c4ce

View file

@ -1267,9 +1267,9 @@ zathura_jumplist_trim(zathura_t* zathura)
--zathura->jumplist.size;
}
if (zathura->jumplist.size == 0) {
if (zathura->jumplist.size == 0 || (zathura->jumplist.size != 0 && zathura->jumplist.cur != NULL)) {
girara_list_iterator_free(cur);
} else if (zathura->jumplist.cur == NULL) {
} else {
zathura->jumplist.cur = cur;
}
}