Set name_mapping to NULL after freeing

To avoid risk of double-free.
    
Fixes #237.
3 jobs for master in 6 minutes and 28 seconds (queued for 2 seconds)
Status Job ID Name Coverage
  Build
passed #2645665
mingw-build

00:05:01

passed #2645663
shared-build

00:06:28

passed #2645664
static-build

00:04:54