On Mon, 27.10.14 23:36, philippedesw...@gmail.com (philippedesw...@gmail.com) 
wrote:

> From: Philippe De Swert <philippedesw...@gmail.com>
> 
> ordered_hashmap_steal_first() can return NULL (and this is usually checked
> except here), so there is a potential NULL pointer reference.
> Thus moving the NULL check to cover both possible allocations of the
> ChainCacheItem.

We explicitly checked the hashmap size to be >= CHAIN_CACHE_MAX first,
hence there must be something in the hashmap, hence the steal
operation cannot fail.

To make this clearer I have now added an assert() here.

Lennart

-- 
Lennart Poettering, Red Hat
_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to