eo: Fix crashes with call cache after init cycle
authorJean-Philippe Andre <jp.andre@samsung.com>
Tue, 26 Sep 2017 08:00:27 +0000 (17:00 +0900)
committerJean-Philippe Andre <jp.andre@samsung.com>
Tue, 26 Sep 2017 08:58:07 +0000 (17:58 +0900)
commit0ae529ac196a5b212e2b7386aef9978c4cfa095c
treee595a510127504be457b5a2fa8fa02504eb37cc1
parentf839905184ef084fad55f3deadd51b405768a49c
eo: Fix crashes with call cache after init cycle

It's not enough to check the init generation count, if the cache data is
not reset properly.

This patch adds safety in two ways:
 1. Actually reset the op call cache when we detect a new generation
 2. Verify that we don't return NULL function pointer

The 1st point is absolutely necessary, 2nd is optional (extra cost of
one if()).

@fix
src/lib/eo/Eo.h
src/lib/eo/eo.c