Set name_mapping to NULL after freeing

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

00:05:24

passed #2646497
shared-build

00:06:30

passed #2646499
static-build

00:05:24