Your suggested fix looks good but for GA-release I rather apply minimal changes.
commit e53dfb24be73a204b4ee8efee6c07e1b13200052
Author: Jan Lindström <jan.lindstrom@mariadb.com>
Date: Mon Feb 6 10:55:23 2017 +0200
MDEV-11707: Fix incorrect memset() for structures containing
dynamic class GenericPolicy<TTASEventMutex<GenericPolicy> >'; vtable
Instead using mem_heap_alloc and memset, use mem_heap_zalloc
directly.
storage/innobase/buf/buf0mtflu.cc:489:9: warning:
destination for this 'memset' call is a pointer to class containing a
dynamic class 'GenericPolicy<TTASEventMutex<GenericPolicy> >'; vtable
pointer will be overwritten [-Wdynamic-class-memaccess]
memset(mtflush_ctx, 0, sizeof(thread_sync_t));