X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=lib%2Fstring-map.c;h=0bb77e93aaec8e461a4bc27778d17598e116f255;hb=55524bb063c95ae51a1762eb0b1aacce6ca49223;hp=591ff6d5bdc525d5b507d30c12f8d41921c29502;hpb=b846bdb48233c907d1ecaff495fbf6bc578910d6;p=notmuch diff --git a/lib/string-map.c b/lib/string-map.c index 591ff6d5..0bb77e93 100644 --- a/lib/string-map.c +++ b/lib/string-map.c @@ -170,6 +170,9 @@ _notmuch_string_map_iterator_create (notmuch_string_map_t *map, const char *key, if (unlikely (iter == NULL)) return NULL; + if (unlikely (talloc_reference (iter, map) == NULL)) + return NULL; + iter->key = talloc_strdup (iter, key); iter->exact = exact; iter->current = bsearch_first (map->pairs, map->length, key, exact);