]> git.ipfire.org Git - thirdparty/systemd.git/commit
hashmap: make sure hashmap_get_strv()+set_get_strv() work with a NULL object
authorLennart Poettering <lennart@poettering.net>
Fri, 2 Jul 2021 13:15:17 +0000 (15:15 +0200)
committerLuca Boccassi <luca.boccassi@gmail.com>
Fri, 2 Jul 2021 21:32:19 +0000 (22:32 +0100)
commit107e21635bb59a01bc92dda05211b03a7d40bde6
treee7a01e985f6db54cb29ece5ca357dcca626b4645
parentf127fed75d3bae3a1eb0be6feea334bb8d1c3a43
hashmap: make sure hashmap_get_strv()+set_get_strv() work with a NULL object

Before we invoke n_entries() we need to check for non-NULL here, like in
all other calls to the helper function. Otherwise we'll crash when
invoked with a NULL object, which we usually consider equivalent to an
empty one though.
src/basic/hashmap.c