Re: [systemd-devel] [PATCH] journal: avoid NULL pointer dereference in chain_cache_put

2014-10-27 Thread Lennart Poettering
On Mon, 27.10.14 23:36, philippedesw...@gmail.com (philippedesw...@gmail.com) wrote: > From: Philippe De Swert > > 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 bot

[systemd-devel] [PATCH] journal: avoid NULL pointer dereference in chain_cache_put

2014-10-27 Thread philippedeswert
From: Philippe De Swert 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. Found with coverity. Fixes: CID#1249723 --- src/j