diff options
author | Benoît Ganne <bganne@cisco.com> | 2019-09-11 16:43:44 +0200 |
---|---|---|
committer | Dave Barach <openvpp@barachs.net> | 2019-09-30 16:12:30 +0000 |
commit | f26b2511cf661d4ebef32c19f944041637ec5907 (patch) | |
tree | f2a0e90d9ceae0b0024019549a529f241238fb40 | |
parent | ae07240340b6fb44b1a8faa38e60da43bfd1307c (diff) |
api: fix use-after-free
Type: fix
Change-Id: I2a599c22d5770587fdd419e5d212c8527054d2e9
Signed-off-by: Benoît Ganne <bganne@cisco.com>
-rw-r--r-- | src/vlibmemory/memory_api.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/vlibmemory/memory_api.c b/src/vlibmemory/memory_api.c index b87aa76b2d0..34fd9563b73 100644 --- a/src/vlibmemory/memory_api.c +++ b/src/vlibmemory/memory_api.c @@ -319,6 +319,9 @@ vl_api_memclnt_delete_t_handler (vl_api_memclnt_delete_t * mp) } } + /* No dangling references, please */ + *regpp = 0; + /* For horizontal scaling, add a hash table... */ for (i = 0; i < vec_len (am->vlib_private_rps); i++) { @@ -347,9 +350,6 @@ vl_api_memclnt_delete_t_handler (vl_api_memclnt_delete_t * mp) } } - /* No dangling references, please */ - *regpp = 0; - if (private_registration == 0) { pool_put_index (am->vl_clients, |